aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/zerosized.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2019-01-15 15:13:24 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2019-01-15 15:13:24 +0100
commit027e44ed24f39697263263dfc7193d8fd9feeba8 (patch)
treed243aac1beb652e59f34ada55e70a79ac9f6ac37 /test/zerosized.cpp
parentf8bc5cb39e2814d171901e45c1d0ebfeaec49e65 (diff)
bug #1592: makes partial min/max reductions trigger an assertion on inputs with a zero reduction length (+doc and tests)
Diffstat (limited to 'test/zerosized.cpp')
-rw-r--r--test/zerosized.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/zerosized.cpp b/test/zerosized.cpp
index edd1f6925..6be136e25 100644
--- a/test/zerosized.cpp
+++ b/test/zerosized.cpp
@@ -16,9 +16,13 @@ template<typename MatrixType> void zeroReduction(const MatrixType& m) {
VERIFY(!m.any());
VERIFY(m.prod()==1);
VERIFY(m.sum()==0);
+ VERIFY(m.norm()==0);
+ VERIFY(m.squaredNorm()==0);
VERIFY(m.count()==0);
VERIFY(m.allFinite());
VERIFY(!m.hasNaN());
+ VERIFY_RAISES_ASSERT( m.minCoeff() );
+ VERIFY_RAISES_ASSERT( m.maxCoeff() );
}