Update test coverage

This commit is contained in:
2023-06-30 21:41:03 -04:00
parent 96fec9d7c2
commit 7efca4a154
9 changed files with 88 additions and 56 deletions

View File

@@ -1,7 +1,7 @@
//Matrix/src/test/java/com/mattrixwv/matrix/TestBigBigIntegerMatrix.java
//Mattrixwv
// Created: 02-10-22
//Modified: 04-13-23
//Modified: 06-30-23
package com.mattrixwv.matrix;
@@ -1861,19 +1861,19 @@ public class TestBigIntegerMatrix{
@Test
public void testLaplaceExpansionHelper(){
BigIntegerMatrixPublic matrix = new BigIntegerMatrixPublic();
BigIntegerMatrix matrix = new BigIntegerMatrix();
matrix.addRow(grid2[0]);
assertThrows(InvalidGeometryException.class, () -> {
matrix.laplaceExpansionHelper(0, 0);
});
BigIntegerMatrixPublic matrix2 = new BigIntegerMatrixPublic();
BigIntegerMatrix matrix2 = new BigIntegerMatrix();
matrix2.setGrid(grid1);
assertThrows(InvalidGeometryException.class, () -> {
matrix2.laplaceExpansionHelper(0, 0);
});
BigIntegerMatrixPublic matrix3 = new BigIntegerMatrixPublic();
BigIntegerMatrix matrix3 = new BigIntegerMatrix();
matrix3.setGrid(grid2);
assertThrows(InvalidCoordinatesException.class, () -> {
matrix3.laplaceExpansionHelper(-1, 0);
@@ -1887,9 +1887,16 @@ public class TestBigIntegerMatrix{
assertThrows(InvalidCoordinatesException.class, () -> {
matrix3.laplaceExpansionHelper(0, 2);
});
}
private class BigIntegerMatrixPublic extends BigIntegerMatrix{
BigIntegerMatrix matrix4 = new BigIntegerMatrix();
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);
});
}
}