#ifdef TEST #include "unity.h" #include "Modules.c" void setUp(void) { } void tearDown(void) { } void test_checkBallPosition_output_if_goal(void) { /* arrange */ binX = 1; binY = 1; ballX = 1; ballY = 3; /* act */ int output = checkBallPosition(); /* assert */ 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