Cleaned up DFS testing.
Changed all maps to files.
This commit is contained in:
parent
c3998150f9
commit
ed48e164b6
@ -48,16 +48,11 @@ public class DepthFirstSearchTest {
|
||||
|
||||
private DepthFirstSearch dfs;
|
||||
|
||||
private byte[][] mapA = new byte[][] { { 1, 1 }, { 1, 0 }, { 1, 1 } };
|
||||
|
||||
private byte[][] mapB = new byte[][] { { 1, 1, 1, 1 }, { 1, 0, 0, 0 }, { 1, 2, 1, 1 } };
|
||||
|
||||
private byte[][] mapC = new byte[][] { { 1, 1, 1, 1 }, { 0, 0, 0, 0 }, { 1, 1, 1, 1 } };
|
||||
|
||||
private byte[][] mapD = new byte[][] { { 1, 1, 1, 1 }, { 0, 0, 0, 1 }, { 1, 1, 1, 1 }, { 2, 0, 0, 0 }, };
|
||||
|
||||
private byte[][] mapE = new byte[][] { { 1, 1, 1, 1 }, { 0, 0, 0, 0 }, { 1, 1, 1, 1 }, { 1, 0, 2, 0 }, };
|
||||
|
||||
private byte[][] mapA;
|
||||
private byte[][] mapB;
|
||||
private byte[][] mapC;
|
||||
private byte[][] mapD;
|
||||
private byte[][] mapE;
|
||||
private byte[][] mapF;
|
||||
private byte[][] mapG;
|
||||
private byte[][] mapH;
|
||||
@ -65,6 +60,12 @@ public class DepthFirstSearchTest {
|
||||
@BeforeAll
|
||||
public void setUp() throws IOException {
|
||||
dfs = new DepthFirstSearch();
|
||||
mapA = readMap("DFSTestMapSmallA.txt");
|
||||
mapB = readMap("DFSTestMapSmallB.txt");
|
||||
mapC = readMap("DFSTestMapSmallC.txt");
|
||||
mapD = readMap("DFSTestMapSmallD.txt");
|
||||
mapE = readMap("DFSTestMapSmallE.txt");
|
||||
|
||||
mapF = readMap("DFSTestMapLargeA.txt");
|
||||
mapG = readMap("DFSTestMapLargeB.txt");
|
||||
mapH = readMap("DFSTestMapLargeC.txt");
|
||||
|
3
src/test/resources/DFSTestMapSmallA.txt
Normal file
3
src/test/resources/DFSTestMapSmallA.txt
Normal file
@ -0,0 +1,3 @@
|
||||
11
|
||||
10
|
||||
11
|
3
src/test/resources/DFSTestMapSmallB.txt
Normal file
3
src/test/resources/DFSTestMapSmallB.txt
Normal file
@ -0,0 +1,3 @@
|
||||
1111
|
||||
1000
|
||||
1211
|
3
src/test/resources/DFSTestMapSmallC.txt
Normal file
3
src/test/resources/DFSTestMapSmallC.txt
Normal file
@ -0,0 +1,3 @@
|
||||
1111
|
||||
0000
|
||||
1111
|
4
src/test/resources/DFSTestMapSmallD.txt
Normal file
4
src/test/resources/DFSTestMapSmallD.txt
Normal file
@ -0,0 +1,4 @@
|
||||
1111
|
||||
0001
|
||||
1111
|
||||
2000
|
4
src/test/resources/DFSTestMapSmallE.txt
Normal file
4
src/test/resources/DFSTestMapSmallE.txt
Normal file
@ -0,0 +1,4 @@
|
||||
1111
|
||||
0000
|
||||
1111
|
||||
1020
|
Loading…
Reference in New Issue
Block a user