style: format code (#4212)

close #4204
This commit is contained in:
acbin
2023-06-09 18:52:05 +08:00
committed by GitHub
parent ad03086f54
commit 00282efd8b
521 changed files with 5233 additions and 7309 deletions

View File

@@ -35,7 +35,7 @@ public class MazeRecursionTest {
map[3][1] = 1;
map[3][2] = 1;
//clone another map for setWay2 method
// clone another map for setWay2 method
for (int i = 0; i < map.length; i++) {
for (int j = 0; j < map[i].length; j++) {
map2[i][j] = map[i][j];
@@ -46,25 +46,25 @@ public class MazeRecursionTest {
MazeRecursion.setWay2(map2, 1, 1);
int[][] expectedMap = new int[][] {
{ 1, 1, 1, 1, 1, 1, 1 },
{ 1, 2, 0, 0, 0, 0, 1 },
{ 1, 2, 2, 2, 0, 0, 1 },
{ 1, 1, 1, 2, 0, 0, 1 },
{ 1, 0, 0, 2, 0, 0, 1 },
{ 1, 0, 0, 2, 0, 0, 1 },
{ 1, 0, 0, 2, 2, 2, 1 },
{ 1, 1, 1, 1, 1, 1, 1 },
{1, 1, 1, 1, 1, 1, 1},
{1, 2, 0, 0, 0, 0, 1},
{1, 2, 2, 2, 0, 0, 1},
{1, 1, 1, 2, 0, 0, 1},
{1, 0, 0, 2, 0, 0, 1},
{1, 0, 0, 2, 0, 0, 1},
{1, 0, 0, 2, 2, 2, 1},
{1, 1, 1, 1, 1, 1, 1},
};
int[][] expectedMap2 = new int[][] {
{ 1, 1, 1, 1, 1, 1, 1 },
{ 1, 2, 2, 2, 2, 2, 1 },
{ 1, 0, 0, 0, 0, 2, 1 },
{ 1, 1, 1, 0, 0, 2, 1 },
{ 1, 0, 0, 0, 0, 2, 1 },
{ 1, 0, 0, 0, 0, 2, 1 },
{ 1, 0, 0, 0, 0, 2, 1 },
{ 1, 1, 1, 1, 1, 1, 1 },
{1, 1, 1, 1, 1, 1, 1},
{1, 2, 2, 2, 2, 2, 1},
{1, 0, 0, 0, 0, 2, 1},
{1, 1, 1, 0, 0, 2, 1},
{1, 0, 0, 0, 0, 2, 1},
{1, 0, 0, 0, 0, 2, 1},
{1, 0, 0, 0, 0, 2, 1},
{1, 1, 1, 1, 1, 1, 1},
};
assertArrayEquals(map, expectedMap);