Add inventory.
This commit is contained in:
@@ -100,17 +100,17 @@ static void test_timeUpdate(void **state) {
|
||||
assert_float_equal(TIME.delta, TIME_STEP, 0.0001f);
|
||||
assert_float_equal(TIME.time, TIME_STEP * 4, 0.0001f);
|
||||
|
||||
// Fifth test, despite a small time passing the game should be trying to catch
|
||||
// and running extra ticks
|
||||
// Fifth test, despite a small time passing the game should not start
|
||||
// trying to run ahead
|
||||
SDL_GETTICKS_TICKS = 104; // Simulate 4ms elapsed
|
||||
SDL_GETTICKS_CALLED = false;
|
||||
timeUpdate();
|
||||
assert_true(SDL_GETTICKS_CALLED);
|
||||
assert_false(TIME.dynamicUpdate);
|
||||
assert_true(TIME.dynamicUpdate);
|
||||
assert_float_equal(TIME.dynamicDelta, 0.004f, 0.0001f);
|
||||
assert_float_equal(TIME.dynamicTime, TIME_STEP + 0.104f, 0.0001f);
|
||||
assert_float_equal(TIME.delta, TIME_STEP, 0.0001f);
|
||||
assert_float_equal(TIME.time, TIME_STEP * 5, 0.0001f);
|
||||
assert_float_equal(TIME.time, TIME_STEP * 4, 0.0001f);
|
||||
|
||||
// Time can stand still if needed
|
||||
SDL_GETTICKS_CALLED = false;
|
||||
|
||||
Reference in New Issue
Block a user