Cleaned up DFS testing.

Changed all maps to files.
This commit is contained in:
Harrison Deng 2020-04-22 18:49:06 -05:00
parent c3998150f9
commit ed48e164b6
6 changed files with 28 additions and 10 deletions

View File

@ -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");

View File

@ -0,0 +1,3 @@
11
10
11

View File

@ -0,0 +1,3 @@
1111
1000
1211

View File

@ -0,0 +1,3 @@
1111
0000
1111

View File

@ -0,0 +1,4 @@
1111
0001
1111
2000

View File

@ -0,0 +1,4 @@
1111
0000
1111
1020