Fix a collection of random failures encountered when testing with Bazel.

This commit is contained in:
Antonio Sánchez
2025-06-26 16:58:24 +00:00
committed by Rasmus Munk Larsen
parent 0bce653efc
commit a395ee162d
12 changed files with 52 additions and 23 deletions

View File

@@ -9,6 +9,7 @@
#include "main.h"
#ifdef EIGEN_EXCEPTIONS
#define VERIFY_THROWS_BADALLOC(a) \
{ \
bool threw = false; \
@@ -19,6 +20,10 @@
} \
VERIFY(threw && "should have thrown bad_alloc: " #a); \
}
#else
// No way to catch a bad alloc - program terminates.
#define VERIFY_THROWS_BADALLOC(a)
#endif
template <typename MatrixType>
void triggerMatrixBadAlloc(Index rows, Index cols) {