mirror of
https://github.com/red0124/ssp.git
synced 2025-01-23 04:55:20 +01:00
Split parser tests part 2 into additional segments
This commit is contained in:
parent
11d57bd073
commit
e4fba8a918
@ -15,7 +15,7 @@ endif()
|
||||
if (MSVC)
|
||||
add_compile_options(/bigobj)
|
||||
elseif (MINGW)
|
||||
add_compile_options(-Wa,-mbig-obj -mcmodel=medium)
|
||||
add_compile_options(-Wa,-mbig-obj)
|
||||
endif ()
|
||||
|
||||
include(FetchContent)
|
||||
@ -35,8 +35,8 @@ enable_testing()
|
||||
foreach(name IN ITEMS test_splitter test_parser1_1 test_parser1_2
|
||||
test_parser1_3 test_parser1_4 test_converter
|
||||
test_extractions test_parser2_1 test_parser2_2
|
||||
test_parser2_3 test_parser2_4
|
||||
test_extractions_without_fast_float)
|
||||
test_parser2_3 test_parser2_4 test_parser2_5
|
||||
test_parser2_6 test_extractions_without_fast_float)
|
||||
add_executable("${name}" "${name}.cpp")
|
||||
target_link_libraries("${name}" PRIVATE ssp::ssp fast_float
|
||||
doctest::doctest)
|
||||
|
@ -13,6 +13,8 @@ tests = [
|
||||
'parser2_2',
|
||||
'parser2_3',
|
||||
'parser2_4',
|
||||
'parser2_5',
|
||||
'parser2_6',
|
||||
'extractions_without_fast_float',
|
||||
]
|
||||
|
||||
|
@ -635,25 +635,33 @@ TEST_CASE("parser test various cases version 2 segment 1") {
|
||||
using multiline_r = ss::multiline_restricted<10>;
|
||||
using trimr = ss::trim_right<' '>;
|
||||
using triml = ss::trim_left<' '>;
|
||||
using trim = ss::trim<' '>;
|
||||
|
||||
// segment 1
|
||||
test_option_combinations3<>();
|
||||
test_option_combinations3<escape>();
|
||||
test_option_combinations3<quote>();
|
||||
|
||||
// segment 2
|
||||
test_option_combinations3<quote>();
|
||||
test_option_combinations3<escape, quote>();
|
||||
|
||||
// segment 3
|
||||
test_option_combinations3<escape, multiline>();
|
||||
test_option_combinations3<quote, multiline>();
|
||||
|
||||
// segment 3
|
||||
// segment 4
|
||||
test_option_combinations3<escape, quote, multiline>();
|
||||
test_option_combinations3<escape, quote, multiline_r>();
|
||||
|
||||
// segment 4
|
||||
// segment 5
|
||||
test_option_combinations<escape, quote, multiline, triml>();
|
||||
test_option_combinations<escape, quote, multiline, trimr>();
|
||||
|
||||
// segment 6
|
||||
test_option_combinations3<escape, quote, multiline>();
|
||||
test_option_combinations3<escape, quote, multiline, trim>();
|
||||
#else
|
||||
|
||||
test_option_combinations3<escape, quote, multiline>();
|
||||
#endif
|
||||
}
|
||||
|
@ -3,12 +3,10 @@
|
||||
|
||||
TEST_CASE("parser test various cases version 2 segment 1") {
|
||||
#ifdef CMAKE_GITHUB_CI
|
||||
using quote = ss::quote<'"'>;
|
||||
using escape = ss::escape<'\\'>;
|
||||
|
||||
test_option_combinations3<>();
|
||||
test_option_combinations3<escape>();
|
||||
test_option_combinations3<quote>();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -5,11 +5,9 @@ TEST_CASE("parser test various cases version 2 segment 2") {
|
||||
#ifdef CMAKE_GITHUB_CI
|
||||
using quote = ss::quote<'"'>;
|
||||
using escape = ss::escape<'\\'>;
|
||||
using multiline = ss::multiline;
|
||||
|
||||
test_option_combinations3<quote>();
|
||||
test_option_combinations3<escape, quote>();
|
||||
test_option_combinations3<escape, multiline>();
|
||||
test_option_combinations3<quote, multiline>();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -6,10 +6,9 @@ TEST_CASE("parser test various cases version 2 segment 3") {
|
||||
using quote = ss::quote<'"'>;
|
||||
using escape = ss::escape<'\\'>;
|
||||
using multiline = ss::multiline;
|
||||
using multiline_r = ss::multiline_restricted<10>;
|
||||
|
||||
test_option_combinations3<escape, quote, multiline>();
|
||||
test_option_combinations3<escape, quote, multiline_r>();
|
||||
test_option_combinations3<escape, multiline>();
|
||||
test_option_combinations3<quote, multiline>();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1,19 +1,15 @@
|
||||
#define SEGMENT_NAME "segment4"
|
||||
#define SEGMENT_NAME "segment3"
|
||||
#include "test_parser2.hpp"
|
||||
|
||||
TEST_CASE("parser test various cases version 2 segment 4") {
|
||||
TEST_CASE("parser test various cases version 2 segment 3") {
|
||||
#ifdef CMAKE_GITHUB_CI
|
||||
using quote = ss::quote<'"'>;
|
||||
using escape = ss::escape<'\\'>;
|
||||
using multiline = ss::multiline;
|
||||
using multiline_r = ss::multiline_restricted<10>;
|
||||
|
||||
#ifdef CMAKE_GITHUB_CI
|
||||
using trimr = ss::trim_right<' '>;
|
||||
using triml = ss::trim_left<' '>;
|
||||
|
||||
test_option_combinations<escape, quote, multiline, triml>();
|
||||
test_option_combinations<escape, quote, multiline, trimr>();
|
||||
#else
|
||||
test_option_combinations3<escape, quote, multiline>();
|
||||
test_option_combinations3<escape, quote, multiline_r>();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
16
test/test_parser2_5.cpp
Normal file
16
test/test_parser2_5.cpp
Normal file
@ -0,0 +1,16 @@
|
||||
#define SEGMENT_NAME "segment3"
|
||||
#include "test_parser2.hpp"
|
||||
|
||||
TEST_CASE("parser test various cases version 2 segment 3") {
|
||||
#ifdef CMAKE_GITHUB_CI
|
||||
using quote = ss::quote<'"'>;
|
||||
using escape = ss::escape<'\\'>;
|
||||
using multiline = ss::multiline;
|
||||
using trimr = ss::trim_right<' '>;
|
||||
using triml = ss::trim_left<' '>;
|
||||
|
||||
test_option_combinations<escape, quote, multiline, triml>();
|
||||
test_option_combinations<escape, quote, multiline, trimr>();
|
||||
#endif
|
||||
}
|
||||
|
18
test/test_parser2_6.cpp
Normal file
18
test/test_parser2_6.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
#define SEGMENT_NAME "segment4"
|
||||
#include "test_parser2.hpp"
|
||||
|
||||
TEST_CASE("parser test various cases version 2 segment 4") {
|
||||
using quote = ss::quote<'"'>;
|
||||
using escape = ss::escape<'\\'>;
|
||||
using multiline = ss::multiline;
|
||||
|
||||
#ifdef CMAKE_GITHUB_CI
|
||||
using trim = ss::trim<' '>;
|
||||
|
||||
test_option_combinations3<escape, quote, multiline>();
|
||||
test_option_combinations3<escape, quote, multiline, trim>();
|
||||
#else
|
||||
test_option_combinations3<escape, quote, multiline>();
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user