diff options
author | Tim Murray <timmurray@google.com> | 2015-02-05 10:29:43 -0800 |
---|---|---|
committer | Tim Murray <timmurray@google.com> | 2015-02-17 11:34:24 -0800 |
commit | 615d816d068b4d0f5e8df601930b5f160bf7eda1 (patch) | |
tree | aa235908947bacf48c08d47ffefbfabca71d6b4d /failtest | |
parent | 7faaa9f3f0df9d23790277834d426c3d992ac3ba (diff) | |
download | eigen-615d816d068b4d0f5e8df601930b5f160bf7eda1.tar.gz |
Rebase Eigen to 3.2.4.
Change-Id: Ia5161a916545b0a7903825b57faac438086320f3
Diffstat (limited to 'failtest')
-rw-r--r-- | failtest/CMakeLists.txt | 6 | ||||
-rw-r--r-- | failtest/ref_1.cpp | 18 | ||||
-rw-r--r-- | failtest/ref_2.cpp | 15 | ||||
-rw-r--r-- | failtest/ref_3.cpp | 15 | ||||
-rw-r--r-- | failtest/ref_4.cpp | 15 | ||||
-rw-r--r-- | failtest/ref_5.cpp | 16 |
6 files changed, 85 insertions, 0 deletions
diff --git a/failtest/CMakeLists.txt b/failtest/CMakeLists.txt index 5afa2ac82..5c4860237 100644 --- a/failtest/CMakeLists.txt +++ b/failtest/CMakeLists.txt @@ -26,6 +26,12 @@ 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") +ei_add_failtest("ref_1") +ei_add_failtest("ref_2") +ei_add_failtest("ref_3") +ei_add_failtest("ref_4") +ei_add_failtest("ref_5") + if (EIGEN_FAILTEST_FAILURE_COUNT) message(FATAL_ERROR "${EIGEN_FAILTEST_FAILURE_COUNT} out of ${EIGEN_FAILTEST_COUNT} failtests FAILED. " diff --git a/failtest/ref_1.cpp b/failtest/ref_1.cpp new file mode 100644 index 000000000..8b798d53d --- /dev/null +++ b/failtest/ref_1.cpp @@ -0,0 +1,18 @@ +#include "../Eigen/Core" + +#ifdef EIGEN_SHOULD_FAIL_TO_BUILD +#define CV_QUALIFIER const +#else +#define CV_QUALIFIER +#endif + +using namespace Eigen; + +void call_ref(Ref<VectorXf> a) { } + +int main() +{ + VectorXf a(10); + CV_QUALIFIER VectorXf& ac(a); + call_ref(ac); +} diff --git a/failtest/ref_2.cpp b/failtest/ref_2.cpp new file mode 100644 index 000000000..0b779ccf5 --- /dev/null +++ b/failtest/ref_2.cpp @@ -0,0 +1,15 @@ +#include "../Eigen/Core" + +using namespace Eigen; + +void call_ref(Ref<VectorXf> a) { } + +int main() +{ + MatrixXf A(10,10); +#ifdef EIGEN_SHOULD_FAIL_TO_BUILD + call_ref(A.row(3)); +#else + call_ref(A.col(3)); +#endif +} diff --git a/failtest/ref_3.cpp b/failtest/ref_3.cpp new file mode 100644 index 000000000..f46027d48 --- /dev/null +++ b/failtest/ref_3.cpp @@ -0,0 +1,15 @@ +#include "../Eigen/Core" + +using namespace Eigen; + +#ifdef EIGEN_SHOULD_FAIL_TO_BUILD +void call_ref(Ref<VectorXf> a) { } +#else +void call_ref(const Ref<const VectorXf> &a) { } +#endif + +int main() +{ + VectorXf a(10); + call_ref(a+a); +} diff --git a/failtest/ref_4.cpp b/failtest/ref_4.cpp new file mode 100644 index 000000000..6c11fa4cb --- /dev/null +++ b/failtest/ref_4.cpp @@ -0,0 +1,15 @@ +#include "../Eigen/Core" + +using namespace Eigen; + +void call_ref(Ref<MatrixXf,0,OuterStride<> > a) {} + +int main() +{ + MatrixXf A(10,10); +#ifdef EIGEN_SHOULD_FAIL_TO_BUILD + call_ref(A.transpose()); +#else + call_ref(A); +#endif +} diff --git a/failtest/ref_5.cpp b/failtest/ref_5.cpp new file mode 100644 index 000000000..846d52795 --- /dev/null +++ b/failtest/ref_5.cpp @@ -0,0 +1,16 @@ +#include "../Eigen/Core" + +using namespace Eigen; + +void call_ref(Ref<VectorXf> a) { } + +int main() +{ + VectorXf a(10); + DenseBase<VectorXf> &ac(a); +#ifdef EIGEN_SHOULD_FAIL_TO_BUILD + call_ref(ac); +#else + call_ref(ac.derived()); +#endif +} |