diff --git a/build/test/cache/test_Modules.c b/build/test/cache/test_Modules.c index dc68a47..8871ccd 100644 --- a/build/test/cache/test_Modules.c +++ b/build/test/cache/test_Modules.c @@ -531,3 +531,41 @@ void test_generateField_check_if_second_life_away(void) ), (UNITY_UINT)(244), UNITY_DISPLAY_STYLE_INT); } + + + +void test_generateField_check_if_third_life_away(void) + +{ + + + + int output = 1; + + lifeCount = 0; + + + + + + generateField(); + + + + if (field[1][1] == 'X') + + { + + output = 0; + + } + + + + UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((output)), ( + + ((void *)0) + + ), (UNITY_UINT)(261), UNITY_DISPLAY_STYLE_INT); + +} diff --git a/build/test/out/c/test_Modules.o b/build/test/out/c/test_Modules.o index ec5eb38..a90447f 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 9edd7ff..41e5601 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 4276fbd..5020cd2 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 dc68a47..8871ccd 100644 --- a/build/test/preprocess/files/test_Modules.c +++ b/build/test/preprocess/files/test_Modules.c @@ -531,3 +531,41 @@ void test_generateField_check_if_second_life_away(void) ), (UNITY_UINT)(244), UNITY_DISPLAY_STYLE_INT); } + + + +void test_generateField_check_if_third_life_away(void) + +{ + + + + int output = 1; + + lifeCount = 0; + + + + + + generateField(); + + + + if (field[1][1] == 'X') + + { + + output = 0; + + } + + + + UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((output)), ( + + ((void *)0) + + ), (UNITY_UINT)(261), UNITY_DISPLAY_STYLE_INT); + +} diff --git a/build/test/results/test_Modules.pass b/build/test/results/test_Modules.pass index 2111e77..619c566 100644 --- a/build/test/results/test_Modules.pass +++ b/build/test/results/test_Modules.pass @@ -51,11 +51,15 @@ :line: 230 :message: '' :unity_test_time: 0 +- :test: test_generateField_check_if_third_life_away + :line: 247 + :message: '' + :unity_test_time: 0 :failures: [] :ignores: [] :counts: - :total: 12 - :passed: 12 + :total: 13 + :passed: 13 :failed: 0 :ignored: 0 :stdout: @@ -192,7 +196,7 @@ - "| |" - "| V |" - "| / \\ |" -- "| / \\ \e[H\e[2J\e[3J |" +- "| / \\ \e[H\e[2J\e[3J\e[H\e[2J\e[3J |" - "| |" - "| |" - "| |" @@ -238,4 +242,33 @@ - "| |" - "| |" - "|=======================|" -:time: 0.008251766999819665 +- "|=======================|" +- "| XXX 321 |" +- "|=======================|" +- "| \\ |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| V |" +- "| / \\ |" +- "| / \\ |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "|=======================|" +:time: 0.010807849999764585 diff --git a/build/test/runners/test_Modules_runner.c b/build/test/runners/test_Modules_runner.c index 24d9ea7..6a625d7 100644 --- a/build/test/runners/test_Modules_runner.c +++ b/build/test/runners/test_Modules_runner.c @@ -22,6 +22,7 @@ extern void test_generateField_check_middle_position_change_on_score(void); extern void test_generateField_check_first_position_change_on_score(void); extern void test_generateField_check_if_first_life_away(void); extern void test_generateField_check_if_second_life_away(void); +extern void test_generateField_check_if_third_life_away(void); /*=======Mock Management=====*/ @@ -98,6 +99,7 @@ int main(void) run_test(test_generateField_check_first_position_change_on_score, "test_generateField_check_first_position_change_on_score", 196); run_test(test_generateField_check_if_first_life_away, "test_generateField_check_if_first_life_away", 213); run_test(test_generateField_check_if_second_life_away, "test_generateField_check_if_second_life_away", 230); + run_test(test_generateField_check_if_third_life_away, "test_generateField_check_if_third_life_away", 247); return UnityEnd(); } diff --git a/test/test_Modules.c b/test/test_Modules.c index 962f0af..53904a4 100644 --- a/test/test_Modules.c +++ b/test/test_Modules.c @@ -244,4 +244,21 @@ void test_generateField_check_if_second_life_away(void) TEST_ASSERT_EQUAL(0, output); } +void test_generateField_check_if_third_life_away(void) +{ + /* arrange */ + int output = 1; + lifeCount = 0; + + /* act */ + generateField(); + + if (field[1][1] == 'X') + { + output = 0; + } + /* assert */ + TEST_ASSERT_EQUAL(0, output); +} + #endif // TEST \ No newline at end of file