diff options
author | Gael Guennebaud <g.gael@free.fr> | 2016-05-26 17:42:12 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2016-05-26 17:42:12 +0200 |
commit | db62719eda3f4bd6d8992eb911dfc0a4af0770b2 (patch) | |
tree | 95cd30f5b208bccc44efd4c6bd007c7093e28cec /test/vectorwiseop.cpp | |
parent | fdcad686eea0123049c0fc1d4b5cb50894a08ef6 (diff) |
Fix some conversion warnings in unit tests.
Diffstat (limited to 'test/vectorwiseop.cpp')
-rw-r--r-- | test/vectorwiseop.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/vectorwiseop.cpp b/test/vectorwiseop.cpp index 3cc198772..739eacaf3 100644 --- a/test/vectorwiseop.cpp +++ b/test/vectorwiseop.cpp @@ -233,10 +233,10 @@ template<typename MatrixType> void vectorwiseop_matrix(const MatrixType& m) Matrix<Scalar,1,MatrixType::RowsAtCompileTime> tmp(rows); VERIFY_EVALUATION_COUNT( tmp = (m1 * m1.transpose()).colwise().sum(), (MatrixType::RowsAtCompileTime==Dynamic ? 1 : 0)); - m2 = m1.rowwise() - (m1.colwise().sum()/m1.rows()).eval(); - m1 = m1.rowwise() - (m1.colwise().sum()/m1.rows()); + m2 = m1.rowwise() - (m1.colwise().sum()/RealScalar(m1.rows())).eval(); + m1 = m1.rowwise() - (m1.colwise().sum()/RealScalar(m1.rows())); VERIFY_IS_APPROX( m1, m2 ); - VERIFY_EVALUATION_COUNT( m2 = (m1.rowwise() - m1.colwise().sum()/m1.rows()), (MatrixType::RowsAtCompileTime==Dynamic && MatrixType::ColsAtCompileTime!=1 ? 1 : 0) ); + VERIFY_EVALUATION_COUNT( m2 = (m1.rowwise() - m1.colwise().sum()/RealScalar(m1.rows())), (MatrixType::RowsAtCompileTime==Dynamic && MatrixType::ColsAtCompileTime!=1 ? 1 : 0) ); } void test_vectorwiseop() |