mirror of
https://github.com/TheAlgorithms/Java.git
synced 2026-03-13 08:40:43 +08:00
Refactor Code Style (#4151)
This commit is contained in:
@@ -8,8 +8,8 @@ class FloodFillTest {
|
||||
|
||||
@Test
|
||||
void testForEmptyImage() {
|
||||
int image[][] = {};
|
||||
int expected[][] = {};
|
||||
int[][] image = {};
|
||||
int[][] expected = {};
|
||||
|
||||
FloodFill.floodFill(image, 4, 5, 3, 2);
|
||||
assertArrayEquals(expected, image);
|
||||
@@ -17,8 +17,8 @@ class FloodFillTest {
|
||||
|
||||
@Test
|
||||
void testForSingleElementImage() {
|
||||
int image[][] = { { 1 } };
|
||||
int expected[][] = { { 3 } };
|
||||
int[][] image = { { 1 } };
|
||||
int[][] expected = { { 3 } };
|
||||
|
||||
FloodFill.floodFill(image, 0, 0, 3, 1);
|
||||
assertArrayEquals(expected, image);
|
||||
@@ -26,7 +26,7 @@ class FloodFillTest {
|
||||
|
||||
@Test
|
||||
void testForImageOne() {
|
||||
int image[][] = {
|
||||
int[][] image = {
|
||||
{ 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 3, 3, 3, 3, 0, 0 },
|
||||
{ 0, 3, 1, 1, 5, 0, 0 },
|
||||
@@ -36,7 +36,7 @@ class FloodFillTest {
|
||||
{ 0, 0, 0, 3, 3, 3, 3 },
|
||||
};
|
||||
|
||||
int expected[][] = {
|
||||
int[][] expected = {
|
||||
{ 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 3, 3, 3, 3, 0, 0 },
|
||||
{ 0, 3, 2, 2, 5, 0, 0 },
|
||||
@@ -52,7 +52,7 @@ class FloodFillTest {
|
||||
|
||||
@Test
|
||||
void testForImageTwo() {
|
||||
int image[][] = {
|
||||
int[][] image = {
|
||||
{ 0, 0, 1, 1, 0, 0, 0 },
|
||||
{ 1, 1, 3, 3, 3, 0, 0 },
|
||||
{ 1, 3, 1, 1, 5, 0, 0 },
|
||||
@@ -62,7 +62,7 @@ class FloodFillTest {
|
||||
{ 0, 0, 0, 1, 3, 1, 3 },
|
||||
};
|
||||
|
||||
int expected[][] = {
|
||||
int[][] expected = {
|
||||
{ 0, 0, 2, 2, 0, 0, 0 },
|
||||
{ 2, 2, 3, 3, 3, 0, 0 },
|
||||
{ 2, 3, 2, 2, 5, 0, 0 },
|
||||
@@ -78,13 +78,13 @@ class FloodFillTest {
|
||||
|
||||
@Test
|
||||
void testForImageThree() {
|
||||
int image[][] = {
|
||||
int[][] image = {
|
||||
{ 1, 1, 2, 3, 1, 1, 1 },
|
||||
{ 1, 0, 0, 1, 0, 0, 1 },
|
||||
{ 1, 1, 1, 0, 3, 1, 2 },
|
||||
};
|
||||
|
||||
int expected[][] = {
|
||||
int[][] expected = {
|
||||
{ 4, 4, 2, 3, 4, 4, 4 },
|
||||
{ 4, 0, 0, 4, 0, 0, 4 },
|
||||
{ 4, 4, 4, 0, 3, 4, 2 },
|
||||
|
||||
Reference in New Issue
Block a user