diff --git a/build/test/cache/test_Modules.c b/build/test/cache/test_Modules.c index 7a2a7bb..7d05800 100644 --- a/build/test/cache/test_Modules.c +++ b/build/test/cache/test_Modules.c @@ -796,6 +796,8 @@ void test_generateField_check_if_wind_force_correct_displayed(void) + + int output = 1; windForce = 3; @@ -822,7 +824,47 @@ void test_generateField_check_if_wind_force_correct_displayed(void) ((void *)0) - ), (UNITY_UINT)(375), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(376), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_generateField_check_if_wind_only_displayed_if_wind_enabled(void) + +{ + + + + int output = 0; + + windForce = 0; + + lvlNumber = 7; + + + + + + generateField(); + + + + if (field[19][1] != '<' && field[19][1] != '>') + + { + + output = 1; + + } + + + + UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((output)), ( + + ((void *)0) + + ), (UNITY_UINT)(394), UNITY_DISPLAY_STYLE_INT); } @@ -878,6 +920,6 @@ void test_generateField_check_if_wall_is_build_correctly(void) ((void *)0) - ), (UNITY_UINT)(401), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(420), UNITY_DISPLAY_STYLE_INT); } diff --git a/build/test/out/c/test_Modules.o b/build/test/out/c/test_Modules.o index aafa12f..1870846 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 7532af2..bfdfc40 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 c8ca841..cccbccf 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 7a2a7bb..7d05800 100644 --- a/build/test/preprocess/files/test_Modules.c +++ b/build/test/preprocess/files/test_Modules.c @@ -796,6 +796,8 @@ void test_generateField_check_if_wind_force_correct_displayed(void) + + int output = 1; windForce = 3; @@ -822,7 +824,47 @@ void test_generateField_check_if_wind_force_correct_displayed(void) ((void *)0) - ), (UNITY_UINT)(375), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(376), UNITY_DISPLAY_STYLE_INT); + +} + + + +void test_generateField_check_if_wind_only_displayed_if_wind_enabled(void) + +{ + + + + int output = 0; + + windForce = 0; + + lvlNumber = 7; + + + + + + generateField(); + + + + if (field[19][1] != '<' && field[19][1] != '>') + + { + + output = 1; + + } + + + + UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((output)), ( + + ((void *)0) + + ), (UNITY_UINT)(394), UNITY_DISPLAY_STYLE_INT); } @@ -878,6 +920,6 @@ void test_generateField_check_if_wall_is_build_correctly(void) ((void *)0) - ), (UNITY_UINT)(401), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(420), UNITY_DISPLAY_STYLE_INT); } diff --git a/build/test/results/test_Modules.pass b/build/test/results/test_Modules.pass index 7c36e8d..d2ae837 100644 --- a/build/test/results/test_Modules.pass +++ b/build/test/results/test_Modules.pass @@ -83,15 +83,19 @@ :line: 361 :message: '' :unity_test_time: 0 +- :test: test_generateField_check_if_wind_only_displayed_if_wind_enabled + :line: 379 + :message: '' + :unity_test_time: 0 - :test: test_generateField_check_if_wall_is_build_correctly - :line: 378 + :line: 397 :message: '' :unity_test_time: 0 :failures: [] :ignores: [] :counts: - :total: 21 - :passed: 21 + :total: 22 + :passed: 22 :failed: 0 :ignored: 0 :stdout: @@ -509,6 +513,35 @@ - "| |" - "|=======================|" - "|=======================|" +- "| OXX 000 >3 |" +- "|=======================|" +- "| \\ |" +- "| |" +- "| |" +- "| |" +- "| \e[H\e[2J\e[3J |" +- "| |" +- "| |" +- "| V |" +- "| / \\ |" +- "| / \\ |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "| |" +- "|=======================|" +- "|=======================|" - "| OXX 000 >2 |" - "|=======================|" - "| \\ |" @@ -537,4 +570,4 @@ - "| |" - "| |" - "|=======================|" -:time: 0.020374785000058182 +:time: 0.0169911820003108 diff --git a/build/test/runners/test_Modules_runner.c b/build/test/runners/test_Modules_runner.c index cf7e9b5..ade93fa 100644 --- a/build/test/runners/test_Modules_runner.c +++ b/build/test/runners/test_Modules_runner.c @@ -30,6 +30,7 @@ extern void test_generateField_check_if_third_live_is_displayed_correctly(void); extern void test_generateField_check_if_wind_form_right_correct_displayed(void); extern void test_generateField_check_if_wind_form_left_correct_displayed(void); extern void test_generateField_check_if_wind_force_correct_displayed(void); +extern void test_generateField_check_if_wind_only_displayed_if_wind_enabled(void); extern void test_generateField_check_if_wall_is_build_correctly(void); @@ -115,7 +116,8 @@ int main(void) run_test(test_generateField_check_if_wind_form_right_correct_displayed, "test_generateField_check_if_wind_form_right_correct_displayed", 327); run_test(test_generateField_check_if_wind_form_left_correct_displayed, "test_generateField_check_if_wind_form_left_correct_displayed", 344); run_test(test_generateField_check_if_wind_force_correct_displayed, "test_generateField_check_if_wind_force_correct_displayed", 361); - run_test(test_generateField_check_if_wall_is_build_correctly, "test_generateField_check_if_wall_is_build_correctly", 378); + run_test(test_generateField_check_if_wind_only_displayed_if_wind_enabled, "test_generateField_check_if_wind_only_displayed_if_wind_enabled", 379); + run_test(test_generateField_check_if_wall_is_build_correctly, "test_generateField_check_if_wall_is_build_correctly", 397); return UnityEnd(); } diff --git a/test/test_Modules.c b/test/test_Modules.c index a0a7252..96db033 100644 --- a/test/test_Modules.c +++ b/test/test_Modules.c @@ -360,6 +360,7 @@ void test_generateField_check_if_wind_form_left_correct_displayed(void) void test_generateField_check_if_wind_force_correct_displayed(void) { + /* arrange */ int output = 1; windForce = 3; @@ -375,6 +376,24 @@ void test_generateField_check_if_wind_force_correct_displayed(void) TEST_ASSERT_EQUAL(0, output); } +void test_generateField_check_if_wind_only_displayed_if_wind_enabled(void) +{ + /* arrange */ + int output = 0; + windForce = 0; + lvlNumber = 7; + + /* act */ + generateField(); + + if (field[19][1] != '<' && field[19][1] != '>') + { + output = 1; + } + /* assert */ + TEST_ASSERT_EQUAL(0, output); +} + void test_generateField_check_if_wall_is_build_correctly(void) { /* arrange */