Extending testcases

This commit is contained in:
dDogge 2023-12-11 14:34:51 +01:00
parent f9fa515651
commit af77468edc

View file

@ -107,6 +107,37 @@ class SolverTest {
assertFalse(solver.solve());
}
@Test
void unsolvableTestCase3() {
Solver solver = new Solver();
// More complex example
solver.clear();
solver.set(0, 0, 1);
solver.set(0, 1, 2);
solver.set(0, 2, 3);
solver.set(1, 0, 4);
solver.set(1, 1, 5);
solver.set(1, 2, 6);
solver.set(2, 3, 7);
assertFalse(solver.isSolvable());
}
@Test
void solvableTestCase3() {
Solver solver = new Solver();
// More complex example
solver.clear();
solver.set(0, 0, 1);
solver.set(0, 1, 2);
solver.set(0, 2, 3);
solver.set(1, 0, 4);
solver.set(1, 1, 5);
solver.set(1, 2, 6);
assertTrue(solver.isSolvable());
}
@Test
void setBoardInvalidInputThrowsTest() {
Solver solver = new Solver();