From f8179385bd299966bded1b99328ef1bd67faacc6 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 21 Feb 2017 13:56:26 +0100 Subject: Add missing const version of mat(all). --- test/reshape.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/reshape.cpp') diff --git a/test/reshape.cpp b/test/reshape.cpp index 40d98ca1f..a38f5e098 100644 --- a/test/reshape.cpp +++ b/test/reshape.cpp @@ -10,6 +10,13 @@ #include "main.h" +template +typename internal::enable_if::value,bool>::type +is_same_eq(const T1& a, const T2& b) +{ + return (a.array() == b.array()).all(); +} + // just test a 4x4 matrix, enumerate all combination manually template void reshape4x4(MatType m) @@ -75,6 +82,7 @@ void reshape4x4(MatType m) VERIFY_IS_EQUAL( m28r1, m28r2); using placeholders::all; + VERIFY(is_same_eq(m.reshaped(fix(m.size()),fix<1>), m(all))); VERIFY_IS_EQUAL(m.reshaped(16,1), m(all)); VERIFY_IS_EQUAL(m.reshaped(1,16), m(all).transpose()); VERIFY_IS_EQUAL(m(all).reshaped(2,8), m.reshaped(2,8)); -- cgit v1.2.3