diff --git a/build/test/cache/test_Modules.c b/build/test/cache/test_Modules.c index 9b147a2..e1ae190 100644 --- a/build/test/cache/test_Modules.c +++ b/build/test/cache/test_Modules.c @@ -24,10 +24,12 @@ void tearDown(void) -void test_checkBallPosition_output(void) +void test_checkBallPosition_output_if_goal(void) { + + binX = 1; binY = 1; @@ -40,14 +42,18 @@ void test_checkBallPosition_output(void) + + int output = checkBallPosition(); + + UnityAssertEqualNumber((UNITY_INT)((1)), (UNITY_INT)((output)), ( ((void *)0) - ), (UNITY_UINT)(25), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(28), UNITY_DISPLAY_STYLE_INT); } diff --git a/build/test/out/c/test_Modules.o b/build/test/out/c/test_Modules.o index 4ab2f72..3956ae5 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 e3200a7..389437c 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 b839f08..0255a4e 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 9b147a2..e1ae190 100644 --- a/build/test/preprocess/files/test_Modules.c +++ b/build/test/preprocess/files/test_Modules.c @@ -24,10 +24,12 @@ void tearDown(void) -void test_checkBallPosition_output(void) +void test_checkBallPosition_output_if_goal(void) { + + binX = 1; binY = 1; @@ -40,14 +42,18 @@ void test_checkBallPosition_output(void) + + int output = checkBallPosition(); + + UnityAssertEqualNumber((UNITY_INT)((1)), (UNITY_INT)((output)), ( ((void *)0) - ), (UNITY_UINT)(25), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(28), UNITY_DISPLAY_STYLE_INT); } diff --git a/build/test/results/test_Modules.pass b/build/test/results/test_Modules.pass index f0fb63a..92f5d2a 100644 --- a/build/test/results/test_Modules.pass +++ b/build/test/results/test_Modules.pass @@ -3,7 +3,7 @@ :path: test :file: test_Modules.c :successes: -- :test: test_checkBallPosition_output +- :test: test_checkBallPosition_output_if_goal :line: 15 :message: '' :unity_test_time: 0 @@ -15,4 +15,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.0006377379995683441 +:time: 0.0009687959991424577 diff --git a/build/test/runners/test_Modules_runner.c b/build/test/runners/test_Modules_runner.c index 21a9be4..ac612ce 100644 --- a/build/test/runners/test_Modules_runner.c +++ b/build/test/runners/test_Modules_runner.c @@ -10,7 +10,7 @@ char* GlobalOrderError; /*=======External Functions This Runner Calls=====*/ extern void setUp(void); extern void tearDown(void); -extern void test_checkBallPosition_output(void); +extern void test_checkBallPosition_output_if_goal(void); /*=======Mock Management=====*/ @@ -75,7 +75,7 @@ static void run_test(UnityTestFunction func, const char* name, UNITY_LINE_TYPE l int main(void) { UnityBegin("test_Modules.c"); - run_test(test_checkBallPosition_output, "test_checkBallPosition_output", 15); + run_test(test_checkBallPosition_output_if_goal, "test_checkBallPosition_output_if_goal", 15); return UnityEnd(); } diff --git a/test/test_Modules.c b/test/test_Modules.c index 88d7524..13ed1e5 100644 --- a/test/test_Modules.c +++ b/test/test_Modules.c @@ -12,9 +12,20 @@ void tearDown(void) { } -void test_dsadsa_NeedToImplement(void) +void test_checkBallPosition_output_if_goal(void) { - TEST_IGNORE_MESSAGE("Need to Implement dsadsa"); + /* arrange */ + binX = 1; + binY = 1; + + ballX = 1; + ballY = 3; + + /* act */ + int output = checkBallPosition(); + + /* assert */ + TEST_ASSERT_EQUAL(1, output); } #endif // TEST