diff --git a/test/Minesweeper/test_is_Valid_tile.c b/test/Minesweeper/test_is_Valid_tile.c index 65082e2..503146d 100644 --- a/test/Minesweeper/test_is_Valid_tile.c +++ b/test/Minesweeper/test_is_Valid_tile.c @@ -21,4 +21,32 @@ void test_detect_not_valid_tile(void){ TEST_ASSERT_EQUAL_INT(-1, result);//not valid tile } +void test_detect_valid_tile_right(void){ + /* arrange */ + Minesweeper_Board board = initialize_minesweeper(); + int tile = 0; + int direction = 5; + int result; + + /* act */ + result = is_Valid_tile(&board, tile, direction); + + /* assert */ + TEST_ASSERT_EQUAL_INT(1, result);//not valid tile +} + +void test_detect_valid_tile_down(void){ + /* arrange */ + Minesweeper_Board board = initialize_minesweeper(); + int tile = 0; + int direction = 4; + int result; + + /* act */ + result = is_Valid_tile(&board, tile, direction); + + /* assert */ + TEST_ASSERT_EQUAL_INT(0 + board.width, result);//not valid tile +} + #endif // TEST \ No newline at end of file