|
@ -18,7 +18,11 @@ void tearDown(void){ |
|
|
|
|
|
|
|
|
void test_updateBallPosition(void){ |
|
|
void test_updateBallPosition(void){ |
|
|
/* arrange */ |
|
|
/* arrange */ |
|
|
Ball ball = { 10, 10, 1, 1 }; |
|
|
|
|
|
|
|
|
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 expectedX = ball.x + ball.speedX * 5; // erwartete Endposition nach 5 Schritten |
|
|
int expectedY = ball.y + ball.speedY * 5; |
|
|
int expectedY = ball.y + ball.speedY * 5; |
|
|
|
|
|
|
|
|