diff --git a/test/search/LabyrinthineNodeTest.java b/test/search/LabyrinthineNodeTest.java index 67ce6cb..33c2066 100644 --- a/test/search/LabyrinthineNodeTest.java +++ b/test/search/LabyrinthineNodeTest.java @@ -120,28 +120,4 @@ class LabyrinthineNodeTest Assertions.assertArrayEquals(targetSuccessor2, successors.get(1).getValue()); Assertions.assertArrayEquals(targetSuccessor3, successors.get(2).getValue()); } - - @Test - void shouldReturnCorrectTarget() - { - final boolean[][] state = { - {true, false, true}, - {false, true, false}, - {true, false, true} - }; - - final var root = new LabyrinthineNode(state); - - final boolean[][] targetState = { - {true, true, true}, - {true, true, true}, - {true, true, true}, - }; - - final var expected = new LabyrinthineNode(targetState); - - final var actual = new IterativeDeepening().iterativeDeepening(root, expected); - - printSolution(actual); - } } \ No newline at end of file diff --git a/test/search/uninformed/iterativedeepening/IterativeDeepeningTest.java b/test/search/uninformed/iterativedeepening/IterativeDeepeningTest.java index 5a39fa9..5627720 100644 --- a/test/search/uninformed/iterativedeepening/IterativeDeepeningTest.java +++ b/test/search/uninformed/iterativedeepening/IterativeDeepeningTest.java @@ -2,13 +2,14 @@ package search.uninformed.iterativedeepening; import org.junit.jupiter.api.Test; import search.EightPuzzleNode; +import search.LabyrinthineNode; import static search.SearchTestUtils.printSolution; class IterativeDeepeningTest { @Test - void shouldReturnCorrectTarget() + void shouldReturnCorrectTargetEightPuzzle() { final int[][] state = { {5, 0, 3}, @@ -30,7 +31,7 @@ class IterativeDeepeningTest } @Test - void shouldReturnCorrectTargetCubekNode() + void shouldReturnCorrectTargetCubekNodeEightPuzzle() { final int[][] state = { {2, 0, 4}, @@ -50,4 +51,28 @@ class IterativeDeepeningTest printSolution(actual); } + + @Test + void shouldReturnCorrectTargetLabyrinthine() + { + final boolean[][] state = { + {true, false, true}, + {false, true, false}, + {true, false, true} + }; + + final var root = new LabyrinthineNode(state); + + final boolean[][] targetState = { + {true, true, true}, + {true, true, true}, + {true, true, true}, + }; + + final var expected = new LabyrinthineNode(targetState); + + final var actual = new IterativeDeepening().iterativeDeepening(root, expected); + + printSolution(actual); + } } \ No newline at end of file