From 722916e19d86b224ec6c705e24d376def524154b Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Thu, 6 Nov 2014 09:25:26 +0100 Subject: bug #903: clean swap API regarding extra enable_if parameters, and add failtests for swap --- test/swap.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/swap.cpp') diff --git a/test/swap.cpp b/test/swap.cpp index 36b353148..dc3610085 100644 --- a/test/swap.cpp +++ b/test/swap.cpp @@ -41,9 +41,15 @@ template void swap(const MatrixType& m) OtherMatrixType m3_copy = m3; // test swapping 2 matrices of same type + Scalar *d1=m1.data(), *d2=m2.data(); m1.swap(m2); VERIFY_IS_APPROX(m1,m2_copy); VERIFY_IS_APPROX(m2,m1_copy); + if(MatrixType::SizeAtCompileTime==Dynamic) + { + VERIFY(m1.data()==d2); + VERIFY(m2.data()==d1); + } m1 = m1_copy; m2 = m2_copy; -- cgit v1.2.3