| 30 | |
| 31 | |
| 32 | TEST(AfterTest, After) |
| 33 | { |
| 34 | AWAIT_READY(after(Milliseconds(1))); |
| 35 | |
| 36 | Clock::pause(); |
| 37 | |
| 38 | Future<Nothing> future = after(Days(1)); |
| 39 | |
| 40 | EXPECT_TRUE(future.isPending()); |
| 41 | |
| 42 | Clock::advance(Days(1)); |
| 43 | |
| 44 | AWAIT_READY(future); |
| 45 | |
| 46 | future = after(Days(1)); |
| 47 | |
| 48 | EXPECT_TRUE(future.isPending()); |
| 49 | |
| 50 | future.discard(); |
| 51 | |
| 52 | AWAIT_DISCARDED(future); |
| 53 | |
| 54 | Clock::resume(); |
| 55 | } |
| 56 | |
| 57 | |
| 58 | TEST(AfterTest, Loop) |
nothing calls this directly
no test coverage detected