diff --git a/test/Pong/test_updateBallPosition.c b/test/Pong/test_updateBallPosition.c deleted file mode 100644 index 7c4d814..0000000 --- a/test/Pong/test_updateBallPosition.c +++ /dev/null @@ -1,40 +0,0 @@ -#ifdef TEST -#include "unity.h" -#include "pong.h" - -void updateBallPosition(Ball *ball) { - - ball->x += ball->speedX; - ball->y += ball->speedY; -} - -void setUp(void){ - //Wenn Funktion Vorraussetzungen braucht -} - -void tearDown(void){ -} - -void test_updateBallPosition(void){ - /* arrange */ - Ball ball; - ball.x = 10; - ball.y = 10; - ball.speedX = 1; - ball.speedY = 1; - int expectedX = ball.x + ball.speedX * 5; // erwartete Endposition nach 5 Schritten - int expectedY = ball.y + ball.speedY * 5; - - /* act */ - updateBallPosition(&ball); - updateBallPosition(&ball); - updateBallPosition(&ball); - updateBallPosition(&ball); - updateBallPosition(&ball); - - /* assert */ - TEST_ASSERT_EQUAL_INT(expectedX, ball.x); - TEST_ASSERT_EQUAL_INT(expectedY, ball.y); -} - -#endif // TEST