expand unit-tests and fix const-qualifaction bugs thus discovered

This commit is contained in:
Benoit Jacob
2007-12-12 17:48:20 +00:00
parent e9a458a7a5
commit fc7b2b5c20
11 changed files with 58 additions and 26 deletions

View File

@@ -87,6 +87,13 @@ template<typename MatrixType> void adjoint(const MatrixType& m)
// check compatibility of dot and adjoint
VERIFY_IS_APPROX(v1.dot(square * v2), (square.adjoint() * v1).dot(v2));
// like in testBasicStuff, test operator() to check const-qualification
int r = random<int>(0, rows-1),
c = random<int>(0, cols-1);
VERIFY_IS_APPROX(m1.conjugate()(r,c), conj(m1(r,c)));
VERIFY_IS_APPROX(m1.adjoint()(c,r), conj(m1(r,c)));
}
void EigenTest::testAdjoint()