Skip to content

Commit 4b5dfb2

Browse files
authored
codeStyle fix
1 parent fda0d6e commit 4b5dfb2

File tree

1 file changed

+35
-36
lines changed

1 file changed

+35
-36
lines changed

src/test/java/com/thealgorithms/others/IterativeFloodFillTest.java

Lines changed: 35 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -37,23 +37,23 @@ void testForEmptyRow() {
3737
@Test
3838
void testForImageOne() {
3939
int[][] image = {
40-
{0, 0, 0, 0, 0, 0, 0},
41-
{0, 3, 3, 3, 3, 0, 0},
42-
{0, 3, 1, 1, 5, 0, 0},
43-
{0, 3, 1, 1, 5, 5, 3},
44-
{0, 3, 5, 5, 1, 1, 3},
45-
{0, 0, 0, 5, 1, 1, 3},
46-
{0, 0, 0, 3, 3, 3, 3},
40+
{0, 0, 0, 0, 0, 0, 0},
41+
{0, 3, 3, 3, 3, 0, 0},
42+
{0, 3, 1, 1, 5, 0, 0},
43+
{0, 3, 1, 1, 5, 5, 3},
44+
{0, 3, 5, 5, 1, 1, 3},
45+
{0, 0, 0, 5, 1, 1, 3},
46+
{0, 0, 0, 3, 3, 3, 3},
4747
};
4848

4949
int[][] expected = {
50-
{0, 0, 0, 0, 0, 0, 0},
51-
{0, 3, 3, 3, 3, 0, 0},
52-
{0, 3, 2, 2, 5, 0, 0},
53-
{0, 3, 2, 2, 5, 5, 3},
54-
{0, 3, 5, 5, 2, 2, 3},
55-
{0, 0, 0, 5, 2, 2, 3},
56-
{0, 0, 0, 3, 3, 3, 3},
50+
{0, 0, 0, 0, 0, 0, 0},
51+
{0, 3, 3, 3, 3, 0, 0},
52+
{0, 3, 2, 2, 5, 0, 0},
53+
{0, 3, 2, 2, 5, 5, 3},
54+
{0, 3, 5, 5, 2, 2, 3},
55+
{0, 0, 0, 5, 2, 2, 3},
56+
{0, 0, 0, 3, 3, 3, 3},
5757
};
5858

5959
IterativeFloodFill.floodFill(image, 2, 2, 2, 1);
@@ -63,23 +63,23 @@ void testForImageOne() {
6363
@Test
6464
void testForImageTwo() {
6565
int[][] image = {
66-
{0, 0, 1, 1, 0, 0, 0},
67-
{1, 1, 3, 3, 3, 0, 0},
68-
{1, 3, 1, 1, 5, 0, 0},
69-
{0, 3, 1, 1, 5, 5, 3},
70-
{0, 3, 5, 5, 1, 1, 3},
71-
{0, 0, 0, 5, 1, 1, 3},
72-
{0, 0, 0, 1, 3, 1, 3},
66+
{0, 0, 1, 1, 0, 0, 0},
67+
{1, 1, 3, 3, 3, 0, 0},
68+
{1, 3, 1, 1, 5, 0, 0},
69+
{0, 3, 1, 1, 5, 5, 3},
70+
{0, 3, 5, 5, 1, 1, 3},
71+
{0, 0, 0, 5, 1, 1, 3},
72+
{0, 0, 0, 1, 3, 1, 3},
7373
};
7474

7575
int[][] expected = {
76-
{0, 0, 2, 2, 0, 0, 0},
77-
{2, 2, 3, 3, 3, 0, 0},
78-
{2, 3, 2, 2, 5, 0, 0},
79-
{0, 3, 2, 2, 5, 5, 3},
80-
{0, 3, 5, 5, 2, 2, 3},
81-
{0, 0, 0, 5, 2, 2, 3},
82-
{0, 0, 0, 2, 3, 2, 3},
76+
{0, 0, 2, 2, 0, 0, 0},
77+
{2, 2, 3, 3, 3, 0, 0},
78+
{2, 3, 2, 2, 5, 0, 0},
79+
{0, 3, 2, 2, 5, 5, 3},
80+
{0, 3, 5, 5, 2, 2, 3},
81+
{0, 0, 0, 5, 2, 2, 3},
82+
{0, 0, 0, 2, 3, 2, 3},
8383
};
8484

8585
IterativeFloodFill.floodFill(image, 2, 2, 2, 1);
@@ -89,15 +89,15 @@ void testForImageTwo() {
8989
@Test
9090
void testForImageThree() {
9191
int[][] image = {
92-
{1, 1, 2, 3, 1, 1, 1},
93-
{1, 0, 0, 1, 0, 0, 1},
94-
{1, 1, 1, 0, 3, 1, 2},
92+
{1, 1, 2, 3, 1, 1, 1},
93+
{1, 0, 0, 1, 0, 0, 1},
94+
{1, 1, 1, 0, 3, 1, 2},
9595
};
9696

9797
int[][] expected = {
98-
{4, 4, 2, 3, 4, 4, 4},
99-
{4, 0, 0, 4, 0, 0, 4},
100-
{4, 4, 4, 0, 3, 4, 2},
98+
{4, 4, 2, 3, 4, 4, 4},
99+
{4, 0, 0, 4, 0, 0, 4},
100+
{4, 4, 4, 0, 3, 4, 2},
101101
};
102102

103103
IterativeFloodFill.floodFill(image, 0, 1, 4, 1);
@@ -160,5 +160,4 @@ void testForAboveBoundaryY() {
160160
IterativeFloodFill.floodFill(image, 1, 100, 1, 0);
161161
assertArrayEquals(expected, image);
162162
}
163-
164-
}
163+
}

0 commit comments

Comments
 (0)