diff --git a/build/test/cache/test_Modules.c b/build/test/cache/test_Modules.c index d0116f8..4d65025 100644 --- a/build/test/cache/test_Modules.c +++ b/build/test/cache/test_Modules.c @@ -417,3 +417,43 @@ void test_generateField_check_middle_position_change_on_score(void) ), (UNITY_UINT)(193), UNITY_DISPLAY_STYLE_INT); } + + + +void test_generateField_check_first_position_change_on_score(void) + +{ + + + + + + scorePoints = 321; + + int output = 1; + + + + + + generateField(); + + + + if (field[10][1] == '3') + + { + + output = 0; + + } + + + + UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((output)), ( + + ((void *)0) + + ), (UNITY_UINT)(211), UNITY_DISPLAY_STYLE_INT); + +} diff --git a/build/test/out/c/test_Modules.o b/build/test/out/c/test_Modules.o index ab43849..1c6cda6 100644 Binary files a/build/test/out/c/test_Modules.o and b/build/test/out/c/test_Modules.o differ diff --git a/build/test/out/c/test_Modules_runner.o b/build/test/out/c/test_Modules_runner.o index 3a1321e..662a344 100644 Binary files a/build/test/out/c/test_Modules_runner.o and b/build/test/out/c/test_Modules_runner.o differ diff --git a/build/test/out/test_Modules.out b/build/test/out/test_Modules.out index 52f42b8..0ddb26f 100755 Binary files a/build/test/out/test_Modules.out and b/build/test/out/test_Modules.out differ diff --git a/build/test/preprocess/files/test_Modules.c b/build/test/preprocess/files/test_Modules.c index d0116f8..4d65025 100644 --- a/build/test/preprocess/files/test_Modules.c +++ b/build/test/preprocess/files/test_Modules.c @@ -417,3 +417,43 @@ void test_generateField_check_middle_position_change_on_score(void) ), (UNITY_UINT)(193), UNITY_DISPLAY_STYLE_INT); } + + + +void test_generateField_check_first_position_change_on_score(void) + +{ + + + + + + scorePoints = 321; + + int output = 1; + + + + + + generateField(); + + + + if (field[10][1] == '3') + + { + + output = 0; + + } + + + + UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((output)), ( + + ((void *)0) + + ), (UNITY_UINT)(211), UNITY_DISPLAY_STYLE_INT); + +} diff --git a/build/test/results/test_Modules.pass b/build/test/results/test_Modules.pass index 338b929..eaa5ee1 100644 --- a/build/test/results/test_Modules.pass +++ b/build/test/results/test_Modules.pass @@ -39,15 +39,19 @@ :line: 178 :message: '' :unity_test_time: 0 +- :test: test_generateField_check_first_position_change_on_score + :line: 196 + :message: '' + :unity_test_time: 0 :failures: [] :ignores: [] :counts: - :total: 9 - :passed: 9 + :total: 10 + :passed: 10 :failed: 0 :ignored: 0 :stdout: -- "\e[H\e[2J\e[3J\e[H\e[2J\e[3J\e[H\e[2J\e[3J\e[H\e[2J\e[3J\e[H\e[2J\e[3J" +- "\e[H\e[2J\e[3J\e[H\e[2J\e[3J\e[H\e[2J\e[3J\e[H\e[2J\e[3J\e[H\e[2J\e[3J\e[H\e[2J\e[3J" - " Scoreboard:" - '' - "|=======================|" @@ -139,4 +143,33 @@ - "| |" - "| |" - "|=======================|" -:time: 0.00713155700009338 +- "|=======================|" +- "| OOO 321 |" +- "|=======================|" +- "| \\ |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| V |" +- "| / \\ |" +- "| / \\ |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "|=======================|" +:time: 0.005677399999967747 diff --git a/build/test/runners/test_Modules_runner.c b/build/test/runners/test_Modules_runner.c index 05aaf0c..bff2af4 100644 --- a/build/test/runners/test_Modules_runner.c +++ b/build/test/runners/test_Modules_runner.c @@ -19,6 +19,7 @@ extern void test_generateField_check_walls_length_correctly_inserted(void); extern void test_sortScoreboard_check_if_file_is_being_read(void); extern void test_generateField_check_last_position_change_on_score(void); extern void test_generateField_check_middle_position_change_on_score(void); +extern void test_generateField_check_first_position_change_on_score(void); /*=======Mock Management=====*/ @@ -92,6 +93,7 @@ int main(void) run_test(test_sortScoreboard_check_if_file_is_being_read, "test_sortScoreboard_check_if_file_is_being_read", 132); run_test(test_generateField_check_last_position_change_on_score, "test_generateField_check_last_position_change_on_score", 160); run_test(test_generateField_check_middle_position_change_on_score, "test_generateField_check_middle_position_change_on_score", 178); + run_test(test_generateField_check_first_position_change_on_score, "test_generateField_check_first_position_change_on_score", 196); return UnityEnd(); } diff --git a/test/test_Modules.c b/test/test_Modules.c index ee8a527..581e9c8 100644 --- a/test/test_Modules.c +++ b/test/test_Modules.c @@ -193,4 +193,22 @@ void test_generateField_check_middle_position_change_on_score(void) TEST_ASSERT_EQUAL(0, output); } +void test_generateField_check_first_position_change_on_score(void) +{ + /* arrange */ + + scorePoints = 321; + int output = 1; + + /* act */ + generateField(); + + if (field[10][1] == '3') + { + output = 0; + } + /* assert */ + TEST_ASSERT_EQUAL(0, output); +} + #endif // TEST \ No newline at end of file