mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Fix a collection of random failures encountered when testing with Bazel.
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
0bce653efc
commit
a395ee162d
@@ -16,7 +16,7 @@
|
||||
#pragma GCC diagnostic ignored "-Wshadow"
|
||||
#endif
|
||||
|
||||
#ifndef EIGEN_TEST_ANNOYING_SCALAR_DONT_THROW
|
||||
#if defined(EIGEN_EXCEPTIONS) && !defined(EIGEN_TEST_ANNOYING_SCALAR_DONT_THROW)
|
||||
struct my_exception {
|
||||
my_exception() {}
|
||||
~my_exception() {}
|
||||
@@ -76,7 +76,7 @@ class AnnoyingScalar {
|
||||
}
|
||||
|
||||
AnnoyingScalar operator+(const AnnoyingScalar& other) const {
|
||||
#ifndef EIGEN_TEST_ANNOYING_SCALAR_DONT_THROW
|
||||
#if defined(EIGEN_EXCEPTIONS) && !defined(EIGEN_TEST_ANNOYING_SCALAR_DONT_THROW)
|
||||
countdown--;
|
||||
if (countdown <= 0 && !dont_throw) throw my_exception();
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user