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
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user