From 2fe2c391fe37b52d8df2968de5496b9e0e841c05 Mon Sep 17 00:00:00 2001 From: ado Date: Mon, 31 Jul 2023 23:25:47 +0200 Subject: [PATCH] WIP, Continue writing additional parser tests, add big object flag to test cmake for mingw --- test/CMakeLists.txt | 2 ++ test/test_parser2.cpp | 13 ++++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index deca3e5..6cf32ba 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -14,6 +14,8 @@ endif() if (MSVC) add_compile_options(/bigobj) +elseif (MINGW) () + add_compile_options(-Wa,-mbig-obj) endif () include(FetchContent) diff --git a/test/test_parser2.cpp b/test/test_parser2.cpp index e2e1813..c7acbe2 100644 --- a/test/test_parser2.cpp +++ b/test/test_parser2.cpp @@ -317,7 +317,7 @@ void test_combinations(const std::vector& input_data, } std::vector layout; - size_t n = 1 + rng.rand() % 10; + size_t n = 1 + rng.rand() % 5; for (size_t i = 0; i < input_data.size(); ++i) { layout.push_back(i); @@ -570,20 +570,18 @@ void test_combinations_impl() { template void test_combinations_with_error_options() { test_combinations_impl(); +#ifdef CMAKE_GITHUB_CI test_combinations_impl(); test_combinations_impl(); +#endif } template void test_combinations_with_trim_and_error_options() { using trim = ss::trim<' '>; - using trimr = ss::trim_right<' '>; - using triml = ss::trim_left<' '>; test_combinations_with_error_options(); test_combinations_with_error_options(); - test_combinations_with_error_options(); - test_combinations_with_error_options(); } } /* namespace */ @@ -595,6 +593,8 @@ TEST_CASE("parser test various cases version 2") { #ifdef CMAKE_GITHUB_CI using multiline_r = ss::multiline_restricted<10>; + using trimr = ss::trim_right<' '>; + using triml = ss::trim_left<' '>; test_combinations_with_trim_and_error_options<>(); test_combinations_with_trim_and_error_options(); @@ -604,6 +604,9 @@ TEST_CASE("parser test various cases version 2") { test_combinations_with_trim_and_error_options(); test_combinations_with_trim_and_error_options(); test_combinations_with_trim_and_error_options(); + + test_combinations_with_error_options(); + test_combinations_with_error_options(); #else test_combinations_with_trim_and_error_options(); #endif