TEST(TimeManagerTest, testTimeoutNoParam) { TimeManager time; timeManagerTestCallback.callbackNoParamCalled = false; time.setTimeout(1, &timeManagerTestCallback, &TimeManagerTestCallback::timeoutNoParamCallback); time.update(1); ASSERT_TRUE(timeManagerTestCallback.callbackNoParamCalled); }
TEST(TimeManagerTest, testTimeoutWithParam) { TimeManager time; timeManagerTestCallback.callbackWithParamCalled = false; float param = 5.50f; time.setTimeout(1, &timeManagerTestCallback, &TimeManagerTestCallback::timeoutWithParamCallback, (void*) ¶m); time.update(1); ASSERT_TRUE(timeManagerTestCallback.callbackWithParamCalled); ASSERT_EQ(timeManagerTestCallback.callbackParamValue, param); }