summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/common/testcommon.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/common/testcommon.cpp b/test/common/testcommon.cpp
index aa4b3ec5..04d93bb2 100644
--- a/test/common/testcommon.cpp
+++ b/test/common/testcommon.cpp
@@ -244,34 +244,43 @@ int test(int argc, const char *argv[])
Timers::Init();
+ Timer t0(0); // should never expire
Timer t1(1);
Timer t2(2);
Timer t3(3);
+ TEST_THAT(!t0.HasExpired());
TEST_THAT(!t1.HasExpired());
TEST_THAT(!t2.HasExpired());
TEST_THAT(!t3.HasExpired());
sleep(1);
+ TEST_THAT(!t0.HasExpired());
TEST_THAT(t1.HasExpired());
TEST_THAT(!t2.HasExpired());
TEST_THAT(!t3.HasExpired());
sleep(1);
+ TEST_THAT(!t0.HasExpired());
TEST_THAT(t1.HasExpired());
TEST_THAT(t2.HasExpired());
TEST_THAT(!t3.HasExpired());
t1 = Timer(1);
t2 = Timer(2);
+ TEST_THAT(!t0.HasExpired());
TEST_THAT(!t1.HasExpired());
TEST_THAT(!t2.HasExpired());
sleep(1);
+ TEST_THAT(!t0.HasExpired());
TEST_THAT(t1.HasExpired());
TEST_THAT(!t2.HasExpired());
TEST_THAT(t3.HasExpired());
+ // Leave timers initialised for rest of test.
+ // Test main() will cleanup after test finishes.
+
static char *testfilelines[] =
{
"First line",