|
@ -339,6 +339,20 @@ void test_create_minefield_NegativeDimensions(void) |
|
|
TEST_ASSERT_NULL(result); |
|
|
TEST_ASSERT_NULL(result); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_calculate_mines_HeightZero(void) |
|
|
|
|
|
{ |
|
|
|
|
|
/* arrange */ |
|
|
|
|
|
int height = 0; |
|
|
|
|
|
int width = 0; |
|
|
|
|
|
int expected = 0; |
|
|
|
|
|
|
|
|
|
|
|
/* act */ |
|
|
|
|
|
int result = calculate_mines(height, width); |
|
|
|
|
|
|
|
|
|
|
|
/* assert */ |
|
|
|
|
|
TEST_ASSERT_EQUAL_INT(expected, result); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
#endif // TEST |
|
|
#endif // TEST |
|
|
|
|
|
|
|
|
|
|
|
|
|
|