mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-11 11:19:02 +08:00
automatically generate the CALL_SUBTEST_* macros
This commit is contained in:
parent
b175bc464f
commit
f4ac7d2b43
@ -1,4 +1,17 @@
|
||||
|
||||
# generate split test header file
|
||||
message(STATUS ${CMAKE_CURRENT_BINARY_DIR})
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/split_test_helper.h "")
|
||||
foreach(i RANGE 1 999)
|
||||
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/split_test_helper.h
|
||||
"#ifdef EIGEN_TEST_PART_${i}\n"
|
||||
"#define CALL_SUBTEST_${i}(FUNC) CALL_SUBTEST(FUNC)\n"
|
||||
"#else\n"
|
||||
"#define CALL_SUBTEST_${i}(FUNC)\n"
|
||||
"#endif\n\n"
|
||||
)
|
||||
endforeach()
|
||||
|
||||
find_package(GSL)
|
||||
if(GSL_FOUND AND GSL_VERSION_MINOR LESS 9)
|
||||
set(GSL_FOUND "")
|
||||
|
98
test/main.h
98
test/main.h
@ -31,6 +31,9 @@
|
||||
#include <vector>
|
||||
#include <typeinfo>
|
||||
|
||||
// the following file is automatically generated by cmake
|
||||
#include "split_test_helper.h"
|
||||
|
||||
#ifdef NDEBUG
|
||||
#undef NDEBUG
|
||||
#endif
|
||||
@ -195,101 +198,6 @@ static void verify_impl(bool condition, const char *testname, const char *file,
|
||||
g_test_stack.pop_back(); \
|
||||
} while (0)
|
||||
|
||||
#ifdef EIGEN_TEST_PART_1
|
||||
#define CALL_SUBTEST_1(FUNC) CALL_SUBTEST(FUNC)
|
||||
#else
|
||||
#define CALL_SUBTEST_1(FUNC)
|
||||
#endif
|
||||
|
||||
#ifdef EIGEN_TEST_PART_2
|
||||
#define CALL_SUBTEST_2(FUNC) CALL_SUBTEST(FUNC)
|
||||
#else
|
||||
#define CALL_SUBTEST_2(FUNC)
|
||||
#endif
|
||||
|
||||
#ifdef EIGEN_TEST_PART_3
|
||||
#define CALL_SUBTEST_3(FUNC) CALL_SUBTEST(FUNC)
|
||||
#else
|
||||
#define CALL_SUBTEST_3(FUNC)
|
||||
#endif
|
||||
|
||||
#ifdef EIGEN_TEST_PART_4
|
||||
#define CALL_SUBTEST_4(FUNC) CALL_SUBTEST(FUNC)
|
||||
#else
|
||||
#define CALL_SUBTEST_4(FUNC)
|
||||
#endif
|
||||
|
||||
#ifdef EIGEN_TEST_PART_5
|
||||
#define CALL_SUBTEST_5(FUNC) CALL_SUBTEST(FUNC)
|
||||
#else
|
||||
#define CALL_SUBTEST_5(FUNC)
|
||||
#endif
|
||||
|
||||
#ifdef EIGEN_TEST_PART_6
|
||||
#define CALL_SUBTEST_6(FUNC) CALL_SUBTEST(FUNC)
|
||||
#else
|
||||
#define CALL_SUBTEST_6(FUNC)
|
||||
#endif
|
||||
|
||||
#ifdef EIGEN_TEST_PART_7
|
||||
#define CALL_SUBTEST_7(FUNC) CALL_SUBTEST(FUNC)
|
||||
#else
|
||||
#define CALL_SUBTEST_7(FUNC)
|
||||
#endif
|
||||
|
||||
#ifdef EIGEN_TEST_PART_8
|
||||
#define CALL_SUBTEST_8(FUNC) CALL_SUBTEST(FUNC)
|
||||
#else
|
||||
#define CALL_SUBTEST_8(FUNC)
|
||||
#endif
|
||||
|
||||
#ifdef EIGEN_TEST_PART_9
|
||||
#define CALL_SUBTEST_9(FUNC) CALL_SUBTEST(FUNC)
|
||||
#else
|
||||
#define CALL_SUBTEST_9(FUNC)
|
||||
#endif
|
||||
|
||||
#ifdef EIGEN_TEST_PART_10
|
||||
#define CALL_SUBTEST_10(FUNC) CALL_SUBTEST(FUNC)
|
||||
#else
|
||||
#define CALL_SUBTEST_10(FUNC)
|
||||
#endif
|
||||
|
||||
#ifdef EIGEN_TEST_PART_11
|
||||
#define CALL_SUBTEST_11(FUNC) CALL_SUBTEST(FUNC)
|
||||
#else
|
||||
#define CALL_SUBTEST_11(FUNC)
|
||||
#endif
|
||||
|
||||
#ifdef EIGEN_TEST_PART_12
|
||||
#define CALL_SUBTEST_12(FUNC) CALL_SUBTEST(FUNC)
|
||||
#else
|
||||
#define CALL_SUBTEST_12(FUNC)
|
||||
#endif
|
||||
|
||||
#ifdef EIGEN_TEST_PART_13
|
||||
#define CALL_SUBTEST_13(FUNC) CALL_SUBTEST(FUNC)
|
||||
#else
|
||||
#define CALL_SUBTEST_13(FUNC)
|
||||
#endif
|
||||
|
||||
#ifdef EIGEN_TEST_PART_14
|
||||
#define CALL_SUBTEST_14(FUNC) CALL_SUBTEST(FUNC)
|
||||
#else
|
||||
#define CALL_SUBTEST_14(FUNC)
|
||||
#endif
|
||||
|
||||
#ifdef EIGEN_TEST_PART_15
|
||||
#define CALL_SUBTEST_15(FUNC) CALL_SUBTEST(FUNC)
|
||||
#else
|
||||
#define CALL_SUBTEST_15(FUNC)
|
||||
#endif
|
||||
|
||||
#ifdef EIGEN_TEST_PART_16
|
||||
#define CALL_SUBTEST_16(FUNC) CALL_SUBTEST(FUNC)
|
||||
#else
|
||||
#define CALL_SUBTEST_16(FUNC)
|
||||
#endif
|
||||
|
||||
namespace Eigen {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user