diff options
author | Gael Guennebaud <g.gael@free.fr> | 2010-06-28 01:01:29 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2010-06-28 01:01:29 +0200 |
commit | 768bdd08c86bbdb7d577859bdf11687a6f57bbc3 (patch) | |
tree | 1dcd84de30613e496f8b27e492d1e19cd4992bef | |
parent | 75da254fc3f70d5bc5c377ee78b0354ab369dec7 (diff) |
fix bad tests
-rw-r--r-- | test/nesting_ops.cpp | 6 | ||||
-rw-r--r-- | test/nullary.cpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/test/nesting_ops.cpp b/test/nesting_ops.cpp index 831c71da7..ce7109329 100644 --- a/test/nesting_ops.cpp +++ b/test/nesting_ops.cpp @@ -41,10 +41,10 @@ template <typename MatrixType> void run_nesting_ops(const MatrixType& _m) // The only intention of these tests is to ensure that this code does // not trigger any asserts or segmentation faults... more to come. - VERIFY( (m.transpose() * m).diagonal().sum() == (m.transpose() * m).diagonal().sum() ); - VERIFY( (m.transpose() * m).diagonal().array().abs().sum() == (m.transpose() * m).diagonal().array().abs().sum() ); + VERIFY_IS_APPROX( (m.transpose() * m).diagonal().sum(), (m.transpose() * m).diagonal().sum() ); + VERIFY_IS_APPROX( (m.transpose() * m).diagonal().array().abs().sum(), (m.transpose() * m).diagonal().array().abs().sum() ); - VERIFY( (m.transpose() * m).array().abs().sum() == (m.transpose() * m).array().abs().sum() ); + VERIFY_IS_APPROX( (m.transpose() * m).array().abs().sum(), (m.transpose() * m).array().abs().sum() ); } void test_nesting_ops() diff --git a/test/nullary.cpp b/test/nullary.cpp index 9f08ec23a..f12d4c06e 100644 --- a/test/nullary.cpp +++ b/test/nullary.cpp @@ -88,7 +88,7 @@ void testVectorType(const VectorType& base) Matrix<Scalar,1,Dynamic> col_vector(size); row_vector.setLinSpaced(low,high,size); col_vector.setLinSpaced(low,high,size); - VERIFY( (row_vector-col_vector.transpose()).norm() < 1e-10 ); + VERIFY( (row_vector-col_vector.transpose()).norm() < NumTraits<Scalar>::epsilon() ); Matrix<Scalar,Dynamic,1> size_changer(size+50); size_changer.setLinSpaced(low,high,size); |