diff options
author | Yi Kong <yikong@google.com> | 2022-02-25 16:17:02 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2022-02-25 16:17:02 +0000 |
commit | 7cb50013986f04dce5fac87bebf319bb8db37a36 (patch) | |
tree | fb979fb4cf4f8052c8cc66b1ec9516d91fcd859b /test/zerosized.cpp | |
parent | 26a30e76965432e5088c271df90759e49d9636a2 (diff) | |
parent | 10f298fc4175c1b8537c674f654a070c871960e5 (diff) | |
download | eigen-7cb50013986f04dce5fac87bebf319bb8db37a36.tar.gz |
Merge changes Iee153445,Iee274471 am: 79df15ea88 am: 10f298fc41
Original change: https://android-review.googlesource.com/c/platform/external/eigen/+/1999079
Change-Id: I3dd349f9a45d37f37441ff7a7742ebe953b70516
Diffstat (limited to 'test/zerosized.cpp')
-rw-r--r-- | test/zerosized.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/zerosized.cpp b/test/zerosized.cpp index 477ff0070..07afd0f86 100644 --- a/test/zerosized.cpp +++ b/test/zerosized.cpp @@ -16,9 +16,18 @@ 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() ); + Index i,j; + VERIFY_RAISES_ASSERT( m.minCoeff(&i,&j) ); + VERIFY_RAISES_ASSERT( m.maxCoeff(&i,&j) ); + VERIFY_RAISES_ASSERT( m.reshaped().minCoeff(&i) ); + VERIFY_RAISES_ASSERT( m.reshaped().maxCoeff(&i) ); } @@ -81,7 +90,7 @@ template<typename VectorType> void zeroSizedVector() } } -void test_zerosized() +EIGEN_DECLARE_TEST(zerosized) { zeroSizedMatrix<Matrix2d>(); zeroSizedMatrix<Matrix3i>(); |