TR-mbed 1.0
Loading...
Searching...
No Matches
Macros | Functions
sizeoverflow.cpp File Reference
#include "main.h"

Macros

#define VERIFY_THROWS_BADALLOC(a)
 

Functions

template<typename MatrixType >
void triggerMatrixBadAlloc (Index rows, Index cols)
 
template<typename VectorType >
void triggerVectorBadAlloc (Index size)
 
 EIGEN_DECLARE_TEST (sizeoverflow)
 

Macro Definition Documentation

◆ VERIFY_THROWS_BADALLOC

#define VERIFY_THROWS_BADALLOC (   a)
Value:
{ \
bool threw = false; \
try { \
a; \
} \
catch (std::bad_alloc&) { threw = true; } \
VERIFY(threw && "should have thrown bad_alloc: " #a); \
}
ArrayXXi a
Definition Array_initializer_list_23_cxx11.cpp:1

Function Documentation

◆ EIGEN_DECLARE_TEST()

EIGEN_DECLARE_TEST ( sizeoverflow  )

◆ triggerMatrixBadAlloc()

template<typename MatrixType >
void triggerMatrixBadAlloc ( Index  rows,
Index  cols 
)

◆ triggerVectorBadAlloc()

template<typename VectorType >
void triggerVectorBadAlloc ( Index  size)