diff options
author | Yi Kong <yikong@google.com> | 2022-02-25 16:32:14 +0800 |
---|---|---|
committer | Yi Kong <yikong@google.com> | 2022-02-25 15:08:55 +0000 |
commit | 2aab794c004027d008d6b0b64165bf1961d5d2bb (patch) | |
tree | 83bb8f19c67bcafdb2ca4a98414af1b17392ec36 /failtest | |
parent | ca5aa72016f062fd0712bcb86370478de332bca3 (diff) | |
download | eigen-2aab794c004027d008d6b0b64165bf1961d5d2bb.tar.gz |
Upgrade eigen to 3.4.0
Steps:
* Removed common files between Android copy and the matching upstream copy
* Obtained latest upstream tarball (see README.version)
* Extracted over the directory
Bug: 148287349
Test: presubmit
Change-Id: Iee2744719075fdf000b315e973645923da766111
Diffstat (limited to 'failtest')
-rw-r--r-- | failtest/CMakeLists.txt | 13 | ||||
-rw-r--r-- | failtest/initializer_list_1.cpp | 14 | ||||
-rw-r--r-- | failtest/initializer_list_2.cpp | 16 | ||||
-rw-r--r-- | failtest/swap_2.cpp | 2 |
4 files changed, 35 insertions, 10 deletions
diff --git a/failtest/CMakeLists.txt b/failtest/CMakeLists.txt index 1a73f05e6..256e541e2 100644 --- a/failtest/CMakeLists.txt +++ b/failtest/CMakeLists.txt @@ -1,4 +1,3 @@ -message(STATUS "Running the failtests") ei_add_failtest("failtest_sanity_check") @@ -64,12 +63,8 @@ ei_add_failtest("bdcsvd_int") ei_add_failtest("eigensolver_int") ei_add_failtest("eigensolver_cplx") -if (EIGEN_FAILTEST_FAILURE_COUNT) - 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 "") +if(EIGEN_TEST_CXX11) + ei_add_failtest("initializer_list_1") + ei_add_failtest("initializer_list_2") endif() + diff --git a/failtest/initializer_list_1.cpp b/failtest/initializer_list_1.cpp new file mode 100644 index 000000000..92dfd1f65 --- /dev/null +++ b/failtest/initializer_list_1.cpp @@ -0,0 +1,14 @@ +#include "../Eigen/Core" + +#ifdef EIGEN_SHOULD_FAIL_TO_BUILD +#define ROWS Dynamic +#else +#define ROWS 3 +#endif + +using namespace Eigen; + +int main() +{ + Matrix<int, ROWS, 1> {1, 2, 3}; +} diff --git a/failtest/initializer_list_2.cpp b/failtest/initializer_list_2.cpp new file mode 100644 index 000000000..1996050a7 --- /dev/null +++ b/failtest/initializer_list_2.cpp @@ -0,0 +1,16 @@ +#include "../Eigen/Core" + +#ifdef EIGEN_SHOULD_FAIL_TO_BUILD +#define ROWS Dynamic +#define COLS Dynamic +#else +#define ROWS 3 +#define COLS 1 +#endif + +using namespace Eigen; + +int main() +{ + Matrix<int, ROWS, COLS> {1, 2, 3}; +} diff --git a/failtest/swap_2.cpp b/failtest/swap_2.cpp index c130ba6e4..b386cf419 100644 --- a/failtest/swap_2.cpp +++ b/failtest/swap_2.cpp @@ -11,4 +11,4 @@ int main() #else b.swap(ac.const_cast_derived()); #endif -}
\ No newline at end of file +} |