#ifndef CONST_CONTAINER_TEST_ARGS_H #define CONST_CONTAINER_TEST_ARGS_H #include "test.hpp" #define GEN_TEST_OBJ_FROM_ARR(nr, i) TestObj(test_context_params::value<"arr">[i], test_context_params::value<"arr">[i], test_context_params::value<"arr">[i]) struct TestObj { int x = 0; char c = 0; const char * s = "This is a string"; constexpr bool operator==(const TestObj &other) const { return x == other.x && c == other.c && std::string_view(s) == other.s; } }; ADD_TYPE_HINT(TestObj); template<> template<> constexpr int test_context_params::value<"arr">[] = { 1, 2, 3, 4 }; template<> template<> constexpr int test_context_params::value<"arr">[] = { 5, 6, 7, 8, 9, 10, 11, 12 }; template<> template<> constexpr char test_context_params::value<"arr">[] = { 'a', 'B', 'c', 'D' }; template<> template<> constexpr char test_context_params::value<"arr">[] = { 'e', 'F', 'g', 'H', 'i', 'J', '\n', '\0' }; template<> template<> constexpr const char * test_context_params::value<"arr">[] = { "Lorem", "ipsum", "dolor", "sit" }; template<> template<> constexpr const char * test_context_params::value<"arr">[] = { "amet", "consetetur", "sadipscing", "elitr", "sed", "diam", "nonumy", "eirmod", "tempor", "\0" }; template<> template<> constexpr TestObj test_context_params::value<"arr">[] = { GEN_TEST_OBJ_FROM_ARR(0, 0), GEN_TEST_OBJ_FROM_ARR(0, 1), GEN_TEST_OBJ_FROM_ARR(0, 2), GEN_TEST_OBJ_FROM_ARR(0, 3) }; template<> template<> constexpr TestObj test_context_params::value<"arr">[] = { GEN_TEST_OBJ_FROM_ARR(1, 0), GEN_TEST_OBJ_FROM_ARR(1, 1), GEN_TEST_OBJ_FROM_ARR(1, 2), GEN_TEST_OBJ_FROM_ARR(1, 3), GEN_TEST_OBJ_FROM_ARR(1, 4), GEN_TEST_OBJ_FROM_ARR(1, 5), GEN_TEST_OBJ_FROM_ARR(1, 6), GEN_TEST_OBJ_FROM_ARR(1, 7) }; template<> template<> constexpr std::initializer_list test_context_params::value<"ilist"> = { 1, 2, 3, 4 }; template<> template<> constexpr std::initializer_list test_context_params::value<"ilist"> = { 5, 6, 7, 8, 9, 10, 11, 12 }; template<> template<> constexpr std::initializer_list test_context_params::value<"ilist"> = { 'a', 'B', 'c', 'D' }; template<> template<> constexpr std::initializer_list test_context_params::value<"ilist"> = { 'e', 'F', 'g', 'H', 'i', 'J', '\n', '\0' }; template<> template<> constexpr std::initializer_list test_context_params::value<"ilist"> = { "Lorem", "ipsum", "dolor", "sit" }; template<> template<> constexpr std::initializer_list test_context_params::value<"ilist"> = { "amet", "consetetur", "sadipscing", "elitr", "sed", "diam", "nonumy", "eirmod", "tempor", "\0" }; template<> template<> constexpr std::initializer_list test_context_params::value<"ilist"> = { GEN_TEST_OBJ_FROM_ARR(0, 0), GEN_TEST_OBJ_FROM_ARR(0, 1), GEN_TEST_OBJ_FROM_ARR(0, 2), GEN_TEST_OBJ_FROM_ARR(0, 3) }; template<> template<> constexpr std::initializer_list test_context_params::value<"ilist"> = { GEN_TEST_OBJ_FROM_ARR(1, 0), GEN_TEST_OBJ_FROM_ARR(1, 1), GEN_TEST_OBJ_FROM_ARR(1, 2), GEN_TEST_OBJ_FROM_ARR(1, 3), GEN_TEST_OBJ_FROM_ARR(1, 4), GEN_TEST_OBJ_FROM_ARR(1, 5), GEN_TEST_OBJ_FROM_ARR(1, 6), GEN_TEST_OBJ_FROM_ARR(1, 7) }; template<> template<> constexpr std::size_t test_context_params::value<"capacity"> = 10; template<> template<> constexpr std::size_t test_context_params::value<"capacity"> = 10; template<> template<> constexpr std::size_t test_context_params::value<"capacity"> = 10; template<> template<> constexpr std::size_t test_context_params::value<"capacity"> = 10; template<> template<> constexpr std::size_t test_context_params::value<"capacity"> = 200; template<> template<> constexpr std::size_t test_context_params::value<"capacity"> = 200; template<> template<> constexpr std::size_t test_context_params::value<"capacity"> = 200; template<> template<> constexpr std::size_t test_context_params::value<"capacity"> = 200; template<> template<> constexpr std::size_t test_context_params::value<"size"> = 25; template<> template<> constexpr std::size_t test_context_params::value<"size"> = 25; template<> template<> constexpr std::size_t test_context_params::value<"size"> = 25; template<> template<> constexpr std::size_t test_context_params::value<"size"> = 25; template<> template<> constexpr std::size_t test_context_params::value<"size"> = 50; template<> template<> constexpr std::size_t test_context_params::value<"size"> = 50; template<> template<> constexpr std::size_t test_context_params::value<"size"> = 50; template<> template<> constexpr std::size_t test_context_params::value<"size"> = 50; template<> template<> constexpr int test_context_params::value<"value"> = 5; template<> template<> constexpr int test_context_params::value<"value"> = INT_MIN; template<> template<> constexpr char test_context_params::value<"value"> = 'P'; template<> template<> constexpr char test_context_params::value<"value"> = CHAR_MAX; template<> template<> constexpr const char * test_context_params::value<"value"> = "Test string 1"; template<> template<> constexpr const char * test_context_params::value<"value"> = "Test string 2"; template<> template<> constexpr TestObj test_context_params::value<"value"> = TestObj(5, 'P', "Object String 1"); template<> template<> constexpr TestObj test_context_params::value<"value"> = TestObj(INT_MAX, 'p', "2 Object String"); #endif //CONST_CONTAINER_TEST_ARGS_H