Update test coverage
This commit is contained in:
@@ -1840,19 +1840,19 @@ public class TestModMatrix{
|
||||
|
||||
@Test
|
||||
public void testLaplaceExpansionHelper(){
|
||||
ModMatrixPublic matrix = new ModMatrixPublic();
|
||||
ModMatrix matrix = new ModMatrix(Integer.MAX_VALUE);
|
||||
matrix.addRow(grid2[0]);
|
||||
assertThrows(InvalidGeometryException.class, () -> {
|
||||
matrix.laplaceExpansionHelper(0, 0);
|
||||
});
|
||||
|
||||
ModMatrixPublic matrix2 = new ModMatrixPublic();
|
||||
ModMatrix matrix2 = new ModMatrix(Integer.MAX_VALUE);
|
||||
matrix2.setGrid(grid1);
|
||||
assertThrows(InvalidGeometryException.class, () -> {
|
||||
matrix2.laplaceExpansionHelper(0, 0);
|
||||
});
|
||||
|
||||
ModMatrixPublic matrix3 = new ModMatrixPublic();
|
||||
ModMatrix matrix3 = new ModMatrix(Integer.MAX_VALUE);
|
||||
matrix3.setGrid(grid2);
|
||||
assertThrows(InvalidCoordinatesException.class, () -> {
|
||||
matrix3.laplaceExpansionHelper(-1, 0);
|
||||
@@ -1866,12 +1866,16 @@ public class TestModMatrix{
|
||||
assertThrows(InvalidCoordinatesException.class, () -> {
|
||||
matrix3.laplaceExpansionHelper(0, 2);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private class ModMatrixPublic extends ModMatrix{
|
||||
public ModMatrixPublic(){
|
||||
super(Integer.MAX_VALUE);
|
||||
}
|
||||
ModMatrix matrix4 = new ModMatrix(Integer.MAX_VALUE);
|
||||
matrix4.addCol(grid2[0]);
|
||||
assertThrows(InvalidGeometryException.class, () -> {
|
||||
matrix4.laplaceExpansionHelper(0, 0);
|
||||
});
|
||||
matrix4.addCol(grid2[1]);
|
||||
matrix4.addCol(grid2[0]);
|
||||
assertThrows(InvalidGeometryException.class, () -> {
|
||||
matrix4.laplaceExpansionHelper(0, 0);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user