Skip to content
Snippets Groups Projects
Commit 80500b69 authored by Benoit Jacob's avatar Benoit Jacob
Browse files

add more failtests

parent 7ea6ac79
No related branches found
No related tags found
No related merge requests found
......@@ -17,12 +17,20 @@ ei_add_failtest("map_nonconst_ctor_on_const_ptr_0")
ei_add_failtest("map_nonconst_ctor_on_const_ptr_1")
ei_add_failtest("map_nonconst_ctor_on_const_ptr_2")
ei_add_failtest("map_nonconst_ctor_on_const_ptr_3")
ei_add_failtest("map_nonconst_ctor_on_const_ptr_4")
ei_add_failtest("map_on_const_type_actually_const_0")
ei_add_failtest("map_on_const_type_actually_const_1")
ei_add_failtest("block_on_const_type_actually_const_0")
ei_add_failtest("block_on_const_type_actually_const_1")
ei_add_failtest("transpose_on_const_type_actually_const")
ei_add_failtest("diagonal_on_const_type_actually_const")
if (EIGEN_FAILTEST_FAILURE_COUNT)
message(FATAL_ERROR "${EIGEN_FAILTEST_FAILURE_COUNT} out of ${EIGEN_FAILTEST_COUNT} failtests FAILED. "
"Failtests succeed when they generate build errors. "
"To debug these failures, manually compile these programs in ${CMAKE_CURRENT_SOURCE_DIR}.")
message(FATAL_ERROR
"${EIGEN_FAILTEST_FAILURE_COUNT} out of ${EIGEN_FAILTEST_COUNT} failtests FAILED. "
"To debug these failures, manually compile these programs in ${CMAKE_CURRENT_SOURCE_DIR}, "
"with and without #define EIGEN_SHOULD_FAIL_TO_BUILD.")
else()
message(STATUS "Failtest SUCCESS: all ${EIGEN_FAILTEST_COUNT} failtests passed.")
message(STATUS "")
......
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo(){
Matrix3f m;
Block<CV_QUALIFIER Matrix3f>(m, 0, 0, 3, 3).coeffRef(0, 0) = 1.0f;
}
int main() {}
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo(){
MatrixXf m;
Block<CV_QUALIFIER MatrixXf, 3, 3>(m, 0, 0).coeffRef(0, 0) = 1.0f;
}
int main() {}
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo(){
MatrixXf m;
Diagonal<CV_QUALIFIER MatrixXf>(m).coeffRef(0) = 1.0f;
}
int main() {}
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER
#else
#define CV_QUALIFIER const
#endif
using namespace Eigen;
void foo(const float *ptr, DenseIndex rows, DenseIndex cols){
Map<CV_QUALIFIER MatrixXf, Unaligned, OuterStride<> > m(ptr, rows, cols, OuterStride<>(2));
}
int main() {}
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo(float *ptr){
Map<CV_QUALIFIER MatrixXf>(ptr, 1, 1).coeffRef(0,0) = 1.0f;
}
int main() {}
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo(float *ptr){
Map<CV_QUALIFIER Vector3f>(ptr).coeffRef(0) = 1.0f;
}
int main() {}
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo(){
MatrixXf m;
Transpose<CV_QUALIFIER MatrixXf>(m).coeffRef(0, 0) = 1.0f;
}
int main() {}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment