aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/sparse_basic.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2016-12-14 17:53:47 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2016-12-14 17:53:47 +0100
commit11b492e993f4272d86fc4019014b47b09a57a2ce (patch)
tree8c06e606deb555cebc611e625b8ba75739d84cbd /test/sparse_basic.cpp
parente67397bfa7cc1662774c4586f7532bbe3e69e0fd (diff)
bug #1358: fix compilation for sparse += sparse.selfadjointView();
Diffstat (limited to 'test/sparse_basic.cpp')
-rw-r--r--test/sparse_basic.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/sparse_basic.cpp b/test/sparse_basic.cpp
index 2a3117b2b..4d864bbd0 100644
--- a/test/sparse_basic.cpp
+++ b/test/sparse_basic.cpp
@@ -431,6 +431,14 @@ template<typename SparseMatrixType> void sparse_basic(const SparseMatrixType& re
m3 = m2.template selfadjointView<Lower>();
VERIFY_IS_APPROX(m3, refMat3);
+ refMat3 += refMat2.template selfadjointView<Lower>();
+ m3 += m2.template selfadjointView<Lower>();
+ VERIFY_IS_APPROX(m3, refMat3);
+
+ refMat3 -= refMat2.template selfadjointView<Lower>();
+ m3 -= m2.template selfadjointView<Lower>();
+ VERIFY_IS_APPROX(m3, refMat3);
+
// selfadjointView only works for square matrices:
SparseMatrixType m4(rows, rows+1);
VERIFY_RAISES_ASSERT(m4.template selfadjointView<Lower>());