1
0
mirror of https://github.com/meekrosoft/fff synced 2026-01-23 00:15:59 +01:00

Clear fff.call_history when calling FFF_RESET_HISTORY

This commit is contained in:
Kate Hart
2018-10-11 19:30:56 -07:00
parent ef24c19e64
commit 86c5e44614
3 changed files with 10 additions and 2 deletions

View File

@@ -158,11 +158,13 @@ TEST_F(FFFTestSuite, register_call_macro_registers_two_calls)
TEST_F(FFFTestSuite, reset_call_history_resets_call_history)
{
REGISTER_CALL(longfunc0);
REGISTER_CALL(voidfunc1);
FFF_RESET_HISTORY();
REGISTER_CALL(voidfunc2);
ASSERT_EQ(1u, fff.call_history_idx);
ASSERT_EQ(fff.call_history[0], (void *)voidfunc2);
ASSERT_EQ(fff.call_history[1], (void *)0);
}
TEST_F(FFFTestSuite, call_history_will_not_write_past_array_bounds)