Browse Source

refactoring: optimierung_schleife

remotes/origin/branchJulia
fdai8040 11 months ago
parent
commit
a571ef9201
  1. 8
      test/Pong/test_clearScreen.c

8
test/Pong/test_clearScreen.c

@ -18,10 +18,10 @@ void test_clearScreen(void){
/* arrange */ /* arrange */
int i, j; int i, j;
for (i = 0; i < TEST_SCREEN_HEIGHT; i++) { for (i = 0; i < TEST_SCREEN_HEIGHT; i++) {
for (j = 0; j < TEST_SCREEN_WIDTH+1; j++) {
screen[i][j] = 'X';
for (j = 0; j < TEST_SCREEN_WIDTH; j++) {
screen[i][j] = ' ';
} }
screen[i][j-1] = '\0';
screen[i][j] = '\0';
} }
/* act */ /* act */
@ -29,7 +29,7 @@ void test_clearScreen(void){
/* assert */ /* assert */
for (i = 0; i < TEST_SCREEN_HEIGHT; i++) { for (i = 0; i < TEST_SCREEN_HEIGHT; i++) {
for (j = 0; j < TEST_SCREEN_WIDTH+1; j++) {
for (j = 0; j < TEST_SCREEN_WIDTH; j++) {
TEST_ASSERT_EQUAL_INT(' ', screen[i][j]); TEST_ASSERT_EQUAL_INT(' ', screen[i][j]);
} }
} }

Loading…
Cancel
Save