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