diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2008-08-12 02:14:02 +0000 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2008-08-12 02:14:02 +0000 |
commit | 13ad88736e41cd22d057f67e39ba694be76f7010 (patch) | |
tree | d61adf7ab2edd10ae60d113b64dcb20547276265 /test/adjoint.cpp | |
parent | f04c1cb774fae209c6d4d060bda15f7389764887 (diff) |
last small fixes, this is alpha6, eigen2 is now ready for eigen1 apps to
port to.
Diffstat (limited to 'test/adjoint.cpp')
-rw-r--r-- | test/adjoint.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/adjoint.cpp b/test/adjoint.cpp index 835af5e64..3b779f14e 100644 --- a/test/adjoint.cpp +++ b/test/adjoint.cpp @@ -80,6 +80,12 @@ template<typename MatrixType> void adjoint(const MatrixType& m) VERIFY_IS_APPROX(m1.conjugate()(r,c), ei_conj(m1(r,c))); VERIFY_IS_APPROX(m1.adjoint()(c,r), ei_conj(m1(r,c))); + if(NumTraits<Scalar>::HasFloatingPoint) + { + // check that Random().normalized() works: tricky as the random xpr must be evaluated by + // normalized() in order to produce a consistent result. + VERIFY_IS_APPROX(VectorType::Random(rows).normalized().norm(), RealScalar(1)); + } } void test_adjoint() |