|
|
@ -86,4 +86,16 @@ void test_createCommandlist(void){ |
|
|
|
for (size_t i = 0; i < arraySize; i++) { |
|
|
|
TEST_ASSERT_EQUAL_INT( 1, commands[i].fun() ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void test_callCommandById(void){ |
|
|
|
// arrange |
|
|
|
struct command* commands = NULL; |
|
|
|
|
|
|
|
// act |
|
|
|
commands = createCommands(); |
|
|
|
commandFunction actualCommand = getCommandById( commands, 1); |
|
|
|
|
|
|
|
// assert |
|
|
|
TEST_ASSERT_EQUAL_PTR( startMenu, actualCommand ); |
|
|
|
} |