Update test coverage
This commit is contained in:
@@ -1852,19 +1852,19 @@ public class TestLongMatrix{
|
||||
|
||||
@Test
|
||||
public void testLaplaceExpansionHelper(){
|
||||
LongMatrixPublic matrix = new LongMatrixPublic();
|
||||
LongMatrix matrix = new LongMatrix();
|
||||
matrix.addRow(grid2[0]);
|
||||
assertThrows(InvalidGeometryException.class, () -> {
|
||||
matrix.laplaceExpansionHelper(0, 0);
|
||||
});
|
||||
|
||||
LongMatrixPublic matrix2 = new LongMatrixPublic();
|
||||
LongMatrix matrix2 = new LongMatrix();
|
||||
matrix2.setGrid(grid1);
|
||||
assertThrows(InvalidGeometryException.class, () -> {
|
||||
matrix2.laplaceExpansionHelper(0, 0);
|
||||
});
|
||||
|
||||
LongMatrixPublic matrix3 = new LongMatrixPublic();
|
||||
LongMatrix matrix3 = new LongMatrix();
|
||||
matrix3.setGrid(grid2);
|
||||
assertThrows(InvalidCoordinatesException.class, () -> {
|
||||
matrix3.laplaceExpansionHelper(-1, 0);
|
||||
@@ -1878,9 +1878,16 @@ public class TestLongMatrix{
|
||||
assertThrows(InvalidCoordinatesException.class, () -> {
|
||||
matrix3.laplaceExpansionHelper(0, 2);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private class LongMatrixPublic extends LongMatrix{
|
||||
LongMatrix matrix4 = new LongMatrix();
|
||||
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