|
@ -183,3 +183,20 @@ void test_lab_move_from_1_1_W_expected_1_0(void) |
|
|
TEST_ASSERT_TRUE(x == x_expected && y == y_expected); |
|
|
TEST_ASSERT_TRUE(x == x_expected && y == y_expected); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_lab_move_from_5_5_W_expected_5_4(void) |
|
|
|
|
|
{ |
|
|
|
|
|
/* arrange */ |
|
|
|
|
|
unsigned short x = 5; |
|
|
|
|
|
unsigned short y = 5; |
|
|
|
|
|
Direction direction = W; |
|
|
|
|
|
|
|
|
|
|
|
unsigned short x_expected = 5; |
|
|
|
|
|
unsigned short y_expected = 4; |
|
|
|
|
|
|
|
|
|
|
|
/* act */ |
|
|
|
|
|
lab_move(&x, &y, direction); |
|
|
|
|
|
|
|
|
|
|
|
/* assert */ |
|
|
|
|
|
TEST_ASSERT_TRUE(x == x_expected && y == y_expected); |
|
|
|
|
|
} |
|
|
|
|
|
|