|
|
@ -73,4 +73,17 @@ void test_command_startMenu(void){ |
|
|
|
|
|
|
|
// assert |
|
|
|
TEST_ASSERT_EQUAL_INT( expectedState, actualState ); |
|
|
|
} |
|
|
|
|
|
|
|
void test_createCommandlist(void){ |
|
|
|
// arrange |
|
|
|
struct command* commands = NULL; |
|
|
|
|
|
|
|
// act |
|
|
|
commands = createCommands(); |
|
|
|
|
|
|
|
size_t arraySize = sizeof(commands) / sizeof(commands[0]); |
|
|
|
for (size_t i = 0; i < arraySize; i++) { |
|
|
|
TEST_ASSERT_EQUAL_INT( 1, commands[i].fun() ); |
|
|
|
} |
|
|
|
} |