Skip to content

Instantly share code, notes, and snippets.

@sambatyon
Last active January 16, 2017 19:55
Show Gist options
  • Save sambatyon/82dc0008b087c3d05c9c960d0c8a4790 to your computer and use it in GitHub Desktop.
Save sambatyon/82dc0008b087c3d05c9c960d0c8a4790 to your computer and use it in GitHub Desktop.
Extra test that would have failed with my original version of the patch.
TEST(FutureTest, After4)
{
Future<Nothing> witness;
Clock::pause();
Future<Nothing>()
.then([](const Nothing&) { witness = Nothing(); })
.after(Milliseconds(1), [](const Future<Nothing> f) { f = Nothing(); });
Clock::advance(Seconds(2));
Clock::settle();
AWAIT_READY(witness);
EXPECT_SOME(witness);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment