[BAEL-2996] Improved test with simpler matrix validation

This commit is contained in:
dupirefr 2019-06-16 14:40:02 +02:00
parent 082aa7d0a6
commit 8a8f880d33
1 changed files with 1 additions and 9 deletions

View File

@ -34,14 +34,6 @@ class SimpleMatrixUnitTest {
SimpleMatrix actual = firstMatrix.mult(secondMatrix);
assertThat(actual.numRows()).isEqualTo(expected.numRows());
assertThat(actual.numCols()).isEqualTo(expected.numCols());
for (int row = 0; row < actual.numRows(); row++) {
for (int col = 0; col < actual.numCols(); col++) {
assertThat(actual.get(row, col))
.describedAs("Cells at [%d, %d] don't match", row, col)
.isEqualTo(expected.get(row, col));
}
}
assertThat(actual).matches(m -> m.isIdentical(expected, 0d));
}
}