Please don't use assertTrue() for assertions unless the tested function returns a boolean because it results in confusing assertion messages. Use assertEquals(), also the variant with a delta for norm().
Catching exceptions and only writing to System.out will actually not fail the test. You could use assertDoesNotThrow() but it might not mix well with nested assertions.
What does
// Note: Solution requires vector to be saved as an integer-array
mean? I can't see that that would be required in the solutionassertTrue()
for assertions unless the tested function returns aboolean
because it results in confusing assertion messages. UseassertEquals()
, also the variant with a delta fornorm()
.System.out
will actually not fail the test. You could useassertDoesNotThrow()
but it might not mix well with nested assertions.