This commit is contained in:
Immanuel Alvaro Bhirawa 2023-05-09 10:32:08 +10:00
commit 6da9b06e9b
4 changed files with 4 additions and 3 deletions

View File

@ -30,7 +30,7 @@ public class ApplyMoveTest implements TestMapNamePlayerCount {
String result = BlueLagoon.applyMove(game.get(i-2), game.get(i-1));
List<String> errors = sc.compare(game.get(i), result);
if(errors.size() > 0){
Assertions.fail("\n"+"expected: " + game.get(i) + "\nactual: " + result + "\nerrors:\n" + String.join("\n", errors));
Assertions.fail("\nError on input game: " + game.get(i-2) + "\nMove: " + game.get(i-1) + "\nexpected: " + game.get(i) + "\nactual: " + result + "\nerrors:\n" + String.join("\n", errors));
}
}
}

View File

@ -28,7 +28,7 @@ public class EndPhaseTest implements TestMapNamePlayerCount {
String result = BlueLagoon.endPhase(pre.get(i));
List<String> errors = sc.compare(post.get(i), result);
if(errors.size() > 0){
Assertions.fail("\n"+"expected: " + post.get(i) + "\nactual: " + result + "\nerrors:\n" + String.join("\n", errors));
Assertions.fail("\nError ending phase on input: " + pre.get(i) + "\nexpected: " + post.get(i) + "\nactual: " + result + "\nerrors:\n" + String.join("\n", errors));
}
}
}

View File

@ -77,5 +77,6 @@ public class IsPhaseOverTest implements TestMapNamePlayerCount {
for(int game = 0; game < games.size(); game++){
testGame(games.get(game), preEndPhase.get(game), solutions.get(game));
}
testFalse("a 13 2; c 1 S; i 6 0,0 0,1 0,2 0,3 1,0 1,1 1,2 1,3 1,4 2,0 2,1; i 6 0,5 0,6 0,7 1,6 1,7 1,8 2,6 2,7 2,8 3,7 3,8; i 6 7,12 8,11 9,11 9,12 10,10 10,11 11,10 11,11 11,12 12,10 12,11; i 8 0,9 0,10 0,11 1,10 1,11 1,12 2,10 2,11 3,10 3,11 3,12 4,10 4,11 5,11 5,12; i 8 4,0 5,0 5,1 6,0 6,1 7,0 7,1 7,2 8,0 8,1 8,2 9,0 9,1 9,2; i 8 10,3 10,4 11,0 11,1 11,2 11,3 11,4 11,5 12,0 12,1 12,2 12,3 12,4 12,5; i 10 3,3 3,4 3,5 4,2 4,3 4,4 4,5 5,3 5,4 5,5 5,6 6,3 6,4 6,5 6,6 7,4 7,5 7,6 8,4 8,5; i 10 5,8 5,9 6,8 6,9 7,8 7,9 7,10 8,7 8,8 8,9 9,7 9,8 9,9 10,6 10,7 10,8 11,7 11,8 12,7 12,8; s 0,0 0,5 0,9 1,4 1,8 1,12 2,1 3,5 3,7 3,10 3,12 4,0 4,2 5,9 5,11 6,3 6,6 7,0 7,8 7,12 8,2 8,5 9,0 9,9 10,3 10,6 10,10 11,0 11,5 12,2 12,8 12,11; r C 0,5 1,12 10,6 B 0,0 1,4 2,1 6,6 11,5 W 3,7 3,10 4,2 7,12 8,5 P 1,8 3,12 5,9 7,8 9,9 10,10 S 0,9 3,5 4,0 5,11 6,3 7,0 12,8 12,11; p 0 38 2 0 1 0 0 S 7,3 7,4 8,2 8,4 9,0 9,3 9,4 9,5 10,3 T 9,1 9,2 11,4 12,4; p 1 79 1 1 0 0 0 S 10,0 10,1 10,2 11,0 11,1 11,2 11,3 12,2 12,3 T 12,0 12,1;");
}
}

View File

@ -29,7 +29,7 @@ public class PlacePieceTest implements TestMapNamePlayerCount {
String result = BlueLagoon.placePiece(game.get(i-2), game.get(i-1));
List<String> errors = sc.compare(solutions.get(i / 2 - 1), result);
if(errors.size() > 0){
Assertions.fail("\n"+"expected: " + solutions.get(i / 2 - 1) + "\nactual: " + result + "\nerrors:\n" + String.join("\n", errors));
Assertions.fail("\nError on input game: " + game.get(i-2) + "\nMove: " + game.get(i-1) + "\nexpected: " + solutions.get(i / 2 - 1) + "\nactual: " + result + "\nerrors:\n" + String.join("\n", errors));
}
}
}