|
@ -325,6 +325,20 @@ void test_calculate_mines_HeightOne(void) |
|
|
TEST_ASSERT_EQUAL_INT(expected, result); |
|
|
TEST_ASSERT_EQUAL_INT(expected, result); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_create_minefield_NegativeDimensions(void) |
|
|
|
|
|
{ |
|
|
|
|
|
/* arrange */ |
|
|
|
|
|
int height = -3; |
|
|
|
|
|
int width = 4; |
|
|
|
|
|
char within = '0'; |
|
|
|
|
|
|
|
|
|
|
|
/* act */ |
|
|
|
|
|
char** result = create_minefield(height, width, within); |
|
|
|
|
|
|
|
|
|
|
|
/* assert */ |
|
|
|
|
|
TEST_ASSERT_NULL(result); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
#endif // TEST |
|
|
#endif // TEST |
|
|
|
|
|
|
|
|
|
|
|
|
|
|