Move lybrinthine iterative deepening test to correct test class
This commit is contained in:
parent
54eba4aa35
commit
a3a344e057
@ -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);
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user