Do not set AnnoyingScalar::dont_throw if not defined EIGEN_TEST_ANNOYING_SCALAR_DONT_THROW.

- Because that member is not declared if the macro is defined.
This commit is contained in:
Nikolay Tverdokhleb
2021-08-05 14:15:41 +02:00
committed by Nikolay Tverdokhleb
parent 413bc491f1
commit f1b899eef7
2 changed files with 7 additions and 2 deletions

View File

@@ -315,8 +315,9 @@ EIGEN_DECLARE_TEST(sparse_block)
CALL_SUBTEST_4(( sparse_block(SparseMatrix<double,ColMajor,short int>(short(r), short(c))) ));
CALL_SUBTEST_4(( sparse_block(SparseMatrix<double,RowMajor,short int>(short(r), short(c))) ));
#ifndef EIGEN_TEST_ANNOYING_SCALAR_DONT_THROW
AnnoyingScalar::dont_throw = true;
#endif
CALL_SUBTEST_5(( sparse_block(SparseMatrix<AnnoyingScalar>(r,c)) ));
}
}