diff --git a/test/conservative_resize.cpp b/test/conservative_resize.cpp index d709e3346..d48eb126f 100644 --- a/test/conservative_resize.cpp +++ b/test/conservative_resize.cpp @@ -115,9 +115,11 @@ template void noncopyable() { typedef Eigen::Matrix VectorType; typedef Eigen::Matrix MatrixType; - + { +#ifndef EIGEN_TEST_ANNOYING_SCALAR_DONT_THROW AnnoyingScalar::dont_throw = true; +#endif int n = 50; VectorType v0(n), v1(n); MatrixType m0(n,n), m1(n,n), m2(n,n); @@ -156,7 +158,9 @@ EIGEN_DECLARE_TEST(conservative_resize) CALL_SUBTEST_4((run_vector_tests >())); CALL_SUBTEST_5((run_vector_tests >())); +#ifndef EIGEN_TEST_ANNOYING_SCALAR_DONT_THROW AnnoyingScalar::dont_throw = true; +#endif CALL_SUBTEST_6(( run_vector_tests() )); CALL_SUBTEST_6(( noncopyable<0>() )); } diff --git a/test/sparse_block.cpp b/test/sparse_block.cpp index f9668102c..b4905b053 100644 --- a/test/sparse_block.cpp +++ b/test/sparse_block.cpp @@ -315,8 +315,9 @@ EIGEN_DECLARE_TEST(sparse_block) CALL_SUBTEST_4(( sparse_block(SparseMatrix(short(r), short(c))) )); CALL_SUBTEST_4(( sparse_block(SparseMatrix(short(r), short(c))) )); - +#ifndef EIGEN_TEST_ANNOYING_SCALAR_DONT_THROW AnnoyingScalar::dont_throw = true; +#endif CALL_SUBTEST_5(( sparse_block(SparseMatrix(r,c)) )); } }