Skip to content
Snippets Groups Projects
Commit 70b95f31 authored by Nathan Lipiarski's avatar Nathan Lipiarski
Browse files

Hopefully improving test feedback

parent d8c7833e
No related branches found
No related tags found
No related merge requests found
Pipeline #339676 failed with stage
in 37 seconds
package tests.gitlab;
import java.util.Arrays;
import chess.board.ArrayBoard;
import chess.board.ArrayMove;
import chess.game.SimpleEvaluator;
import cse332.chess.interfaces.Move;
import cse332.chess.interfaces.Searcher;
import static org.junit.Assert.*;
import cse332.chess.interfaces.Searcher;
import java.util.Arrays;
import static org.hamcrest.CoreMatchers.hasItem;
import static org.junit.Assert.assertThat;
public abstract class SearcherTests {
protected static Searcher<ArrayMove, ArrayBoard> STUDENT;
......@@ -22,7 +23,7 @@ public abstract class SearcherTests {
protected void checkResult(String fen, String[] valid, Searcher<ArrayMove, ArrayBoard> searcher, int depth, int cutoff) {
ArrayMove result = getBestMove(fen, searcher, depth, cutoff);
assertTrue(Arrays.asList(valid).contains(result.toString()));
assertThat(Arrays.asList(valid), hasItem(result.toString()));
}
protected void depth(int d, int c) {
......
package tests.gitlab;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Random;
import java.util.Scanner;
import tests.exceptions.InformativeException;
public class TestingInputs {
public static Object[][] FENS_TO_TEST = new Object[][] {
new Object[]{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment