|
|
@ -228,6 +228,51 @@ void test_o_wins_onIndex_00_10_20(void) |
|
|
|
TEST_ASSERT_EQUAL_INT(expected, actual); |
|
|
|
} |
|
|
|
|
|
|
|
void test_x_wins_onIndex_20_21_22(void) |
|
|
|
{ |
|
|
|
/* arrange */ |
|
|
|
int actual; |
|
|
|
int expected = 1; |
|
|
|
|
|
|
|
char board[][3] = {{' ',' ',' '}, {' ',' ',' '}, {'X','X','X'}}; |
|
|
|
|
|
|
|
/* act */ |
|
|
|
actual = x_wins_20_21_22(board); |
|
|
|
|
|
|
|
/* assert */ |
|
|
|
TEST_ASSERT_EQUAL_INT(expected, actual); |
|
|
|
} |
|
|
|
|
|
|
|
void test_x_wins_onIndex_00_11_22(void) |
|
|
|
{ |
|
|
|
/* arrange */ |
|
|
|
int actual; |
|
|
|
int expected = 1; |
|
|
|
|
|
|
|
char board[][3] = {{'X',' ',' '}, {' ','X',' '}, {' ',' ','X'}}; |
|
|
|
|
|
|
|
/* act */ |
|
|
|
actual = x_wins_00_11_22(board); |
|
|
|
|
|
|
|
/* assert */ |
|
|
|
TEST_ASSERT_EQUAL_INT(expected, actual); |
|
|
|
} |
|
|
|
|
|
|
|
void test_x_wins_onIndex_02_11_20(void) |
|
|
|
{ |
|
|
|
/* arrange */ |
|
|
|
int actual; |
|
|
|
int expected = 1; |
|
|
|
|
|
|
|
char board[][3] = {{' ',' ','X'}, {' ','X',' '}, {'X',' ',' '}}; |
|
|
|
|
|
|
|
/* act */ |
|
|
|
actual = x_wins_02_11_20(board); |
|
|
|
|
|
|
|
/* assert */ |
|
|
|
TEST_ASSERT_EQUAL_INT(expected, actual); |
|
|
|
} |
|
|
|
|
|
|
|
void test_stringLaenge_von_Kokosnuss(void) |
|
|
|
{ |
|
|
|
/* arrange */ |
|
|
@ -379,4 +424,18 @@ void test_tangentDegrees(void) { |
|
|
|
// Add more test cases for different inputs and expected outputs |
|
|
|
} |
|
|
|
|
|
|
|
void test_weight_at_mass100(void) |
|
|
|
{ |
|
|
|
/* arrange */ |
|
|
|
float actual; |
|
|
|
float expected = 981; |
|
|
|
|
|
|
|
/* act */; |
|
|
|
float m = 100; |
|
|
|
actual = f(m); |
|
|
|
|
|
|
|
/* assert */ |
|
|
|
TEST_ASSERT_EQUAL_FLOAT(expected, actual); |
|
|
|
} |
|
|
|
|
|
|
|
#endif |