From 54235879a9818d1a96a894f1af03cc4aa5631660 Mon Sep 17 00:00:00 2001 From: Jitse Niesen Date: Thu, 10 Jun 2010 19:18:19 +0100 Subject: [PATCH 1/2] Make test slightly fuzzy to account for effect of extended precision. --- test/basicstuff.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/basicstuff.cpp b/test/basicstuff.cpp index 53b503f46..ddddb5985 100644 --- a/test/basicstuff.cpp +++ b/test/basicstuff.cpp @@ -138,7 +138,8 @@ template void basicStuffComplex(const MatrixType& m) VERIFY(ei_imag(s1)==ei_imag_ref(s1)); ei_real_ref(s1) = ei_real(s2); ei_imag_ref(s1) = ei_imag(s2); - VERIFY(s1==s2); + VERIFY(ei_isApprox(s1, s2, NumTraits::epsilon())); + // extended precision in Intel FPUs means that s1 == s2 in the line above is not guaranteed. RealMatrixType rm1 = RealMatrixType::Random(rows,cols), rm2 = RealMatrixType::Random(rows,cols); From fcab4c951d9e97bab3a2ad907984996b1c430b20 Mon Sep 17 00:00:00 2001 From: Jitse Niesen Date: Thu, 10 Jun 2010 21:26:23 +0100 Subject: [PATCH 2/2] Add line to prevent compiler warning on unused variables. --- test/unalignedcount.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/unalignedcount.cpp b/test/unalignedcount.cpp index feff870e5..74eab8c6a 100644 --- a/test/unalignedcount.cpp +++ b/test/unalignedcount.cpp @@ -52,5 +52,8 @@ void test_unalignedcount() VERIFY_ALIGNED_UNALIGNED_COUNT(a.segment(0,40) -= b.segment(0,40), 10, 10, 10, 0); VERIFY_ALIGNED_UNALIGNED_COUNT(a.segment(0,40) *= 3.5, 10, 0, 10, 0); VERIFY_ALIGNED_UNALIGNED_COUNT(a.segment(0,40) /= 3.5, 10, 0, 10, 0); + #else + // The following line is to eliminate "variable not used" warnings + nb_load = nb_loadu = nb_store = nb_storeu = 0; #endif }