aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/redux.cpp1
-rw-r--r--test/vectorwiseop.cpp5
2 files changed, 5 insertions, 1 deletions
diff --git a/test/redux.cpp b/test/redux.cpp
index bfd9a8d50..6ddc59c18 100644
--- a/test/redux.cpp
+++ b/test/redux.cpp
@@ -74,7 +74,6 @@ template<typename MatrixType> void matrixRedux(const MatrixType& m)
Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> m2(rows,rows);
m2.setRandom();
VERIFY_EVALUATION_COUNT( ((m1.matrix()*m1.matrix().transpose())+m2).sum(), (MatrixType::SizeAtCompileTime==Dynamic ? 1 : 0) );
-
}
template<typename VectorType> void vectorRedux(const VectorType& w)
diff --git a/test/vectorwiseop.cpp b/test/vectorwiseop.cpp
index ddd9f8389..529f4298b 100644
--- a/test/vectorwiseop.cpp
+++ b/test/vectorwiseop.cpp
@@ -217,6 +217,11 @@ template<typename MatrixType> void vectorwiseop_matrix(const MatrixType& m)
VERIFY_IS_APPROX( (m1 * m1.transpose()).colwise().sum(), m1m1.colwise().sum());
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());
+ VERIFY_IS_APPROX( m1, m2 );
+ VERIFY_EVALUATION_COUNT( m2 = (m1.rowwise() - m1.colwise().sum()/m1.rows()), (MatrixType::RowsAtCompileTime==Dynamic ? 1 : 0) );
}
void test_vectorwiseop()