aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/block.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2014-09-08 09:50:03 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2014-09-08 09:50:03 +0200
commit188a13f9fe235e1579a1e2da048b3595d60e37e8 (patch)
tree4d1be82f616cc37cf846ae788c7751b667fe87e2 /test/block.cpp
parentdacd39ea76d488133392b3abecf1c5061ba568d7 (diff)
Fix compilation of coeff(Index) on sub-inner-panels
Diffstat (limited to 'test/block.cpp')
-rw-r--r--test/block.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/block.cpp b/test/block.cpp
index 269acd28e..3b77b704a 100644
--- a/test/block.cpp
+++ b/test/block.cpp
@@ -130,6 +130,14 @@ template<typename MatrixType> void block(const MatrixType& m)
VERIFY(numext::real(ones.col(c1).dot(ones.col(c2))) == RealScalar(rows));
VERIFY(numext::real(ones.row(r1).dot(ones.row(r2))) == RealScalar(cols));
+
+ // chekc that linear acccessors works on blocks
+ m1 = m1_copy;
+ if((MatrixType::Flags&RowMajorBit)==0)
+ VERIFY_IS_EQUAL(m1.leftCols(c1).coeff(r1+c1*rows), m1(r1,c1));
+ else
+ VERIFY_IS_EQUAL(m1.topRows(r1).coeff(c1+r1*cols), m1(r1,c1));
+
// now test some block-inside-of-block.