diff --git a/build/test/cache/test_Modules.c b/build/test/cache/test_Modules.c index e1ae190..29312c3 100644 --- a/build/test/cache/test_Modules.c +++ b/build/test/cache/test_Modules.c @@ -57,3 +57,39 @@ void test_checkBallPosition_output_if_goal(void) ), (UNITY_UINT)(28), UNITY_DISPLAY_STYLE_INT); } + + + +void test_checkBallPosition_output_if_no_goal(void) + +{ + + + + binX = 1; + + binY = 1; + + + + ballX = 1; + + ballY = 1; + + + + + + int output = checkBallPosition(); + + + + + + UnityAssertEqualNumber((UNITY_INT)((2)), (UNITY_INT)((output)), ( + + ((void *)0) + + ), (UNITY_UINT)(44), UNITY_DISPLAY_STYLE_INT); + +} diff --git a/build/test/out/c/test_Modules.o b/build/test/out/c/test_Modules.o index 3956ae5..a047f73 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 389437c..c1ea468 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 0255a4e..c578d2a 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 e1ae190..29312c3 100644 --- a/build/test/preprocess/files/test_Modules.c +++ b/build/test/preprocess/files/test_Modules.c @@ -57,3 +57,39 @@ void test_checkBallPosition_output_if_goal(void) ), (UNITY_UINT)(28), UNITY_DISPLAY_STYLE_INT); } + + + +void test_checkBallPosition_output_if_no_goal(void) + +{ + + + + binX = 1; + + binY = 1; + + + + ballX = 1; + + ballY = 1; + + + + + + int output = checkBallPosition(); + + + + + + UnityAssertEqualNumber((UNITY_INT)((2)), (UNITY_INT)((output)), ( + + ((void *)0) + + ), (UNITY_UINT)(44), UNITY_DISPLAY_STYLE_INT); + +} diff --git a/build/test/results/test_Modules.pass b/build/test/results/test_Modules.pass index 92f5d2a..d51c967 100644 --- a/build/test/results/test_Modules.pass +++ b/build/test/results/test_Modules.pass @@ -7,12 +7,16 @@ :line: 15 :message: '' :unity_test_time: 0 +- :test: test_checkBallPosition_output_if_no_goal + :line: 31 + :message: '' + :unity_test_time: 0 :failures: [] :ignores: [] :counts: - :total: 1 - :passed: 1 + :total: 2 + :passed: 2 :failed: 0 :ignored: 0 :stdout: [] -:time: 0.0009687959991424577 +:time: 0.0006384879998222459 diff --git a/build/test/runners/test_Modules_runner.c b/build/test/runners/test_Modules_runner.c index ac612ce..262f019 100644 --- a/build/test/runners/test_Modules_runner.c +++ b/build/test/runners/test_Modules_runner.c @@ -11,6 +11,7 @@ char* GlobalOrderError; extern void setUp(void); extern void tearDown(void); extern void test_checkBallPosition_output_if_goal(void); +extern void test_checkBallPosition_output_if_no_goal(void); /*=======Mock Management=====*/ @@ -76,6 +77,7 @@ int main(void) { UnityBegin("test_Modules.c"); run_test(test_checkBallPosition_output_if_goal, "test_checkBallPosition_output_if_goal", 15); + run_test(test_checkBallPosition_output_if_no_goal, "test_checkBallPosition_output_if_no_goal", 31); return UnityEnd(); } diff --git a/test/test_Modules.c b/test/test_Modules.c index 13ed1e5..0294fa0 100644 --- a/test/test_Modules.c +++ b/test/test_Modules.c @@ -28,4 +28,20 @@ void test_checkBallPosition_output_if_goal(void) TEST_ASSERT_EQUAL(1, output); } +void test_checkBallPosition_output_if_no_goal(void) +{ + /* arrange */ + binX = 1; + binY = 1; + + ballX = 1; + ballY = 1; + + /* act */ + int output = checkBallPosition(); + + /* assert */ + TEST_ASSERT_EQUAL(2, output); +} + #endif // TEST