Update test coverage
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//Matrix/src/test/java/com/mattrixwv/matrix/TestDoubleMatrix.java
|
||||
//Mattrixwv
|
||||
// Created: 02-07-22
|
||||
//Modified: 04-13-23
|
||||
//Modified: 06-30-23
|
||||
package com.mattrixwv.matrix;
|
||||
|
||||
|
||||
@@ -1853,19 +1853,19 @@ public class TestDoubleMatrix{
|
||||
|
||||
@Test
|
||||
public void testLaplaceExpansionHelper(){
|
||||
DoubleMatrixPublic matrix = new DoubleMatrixPublic();
|
||||
DoubleMatrix matrix = new DoubleMatrix();
|
||||
matrix.addRow(grid2[0]);
|
||||
assertThrows(InvalidGeometryException.class, () -> {
|
||||
matrix.laplaceExpansionHelper(0, 0);
|
||||
});
|
||||
|
||||
DoubleMatrixPublic matrix2 = new DoubleMatrixPublic();
|
||||
DoubleMatrix matrix2 = new DoubleMatrix();
|
||||
matrix2.setGrid(grid1);
|
||||
assertThrows(InvalidGeometryException.class, () -> {
|
||||
matrix2.laplaceExpansionHelper(0, 0);
|
||||
});
|
||||
|
||||
DoubleMatrixPublic matrix3 = new DoubleMatrixPublic();
|
||||
DoubleMatrix matrix3 = new DoubleMatrix();
|
||||
matrix3.setGrid(grid2);
|
||||
assertThrows(InvalidCoordinatesException.class, () -> {
|
||||
matrix3.laplaceExpansionHelper(-1, 0);
|
||||
@@ -1879,9 +1879,16 @@ public class TestDoubleMatrix{
|
||||
assertThrows(InvalidCoordinatesException.class, () -> {
|
||||
matrix3.laplaceExpansionHelper(0, 2);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private class DoubleMatrixPublic extends DoubleMatrix{
|
||||
DoubleMatrix matrix4 = new DoubleMatrix();
|
||||
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