diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 4057e19..4fa86e1 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -34,7 +34,8 @@ enable_testing() foreach(name IN ITEMS test_splitter test_parser test_converter test_extractions test_parser2_segment1 test_parser2_segment2 - test_parser2_segment3 test_parser2_segment4) + test_parser2_segment3 test_parser2_segment4 + test_extractions_without_fast_float) add_executable("${name}" "${name}.cpp") target_link_libraries("${name}" PRIVATE ssp::ssp fast_float doctest::doctest) diff --git a/test/meson.build b/test/meson.build index fb88527..9a93212 100644 --- a/test/meson.build +++ b/test/meson.build @@ -1,23 +1,26 @@ -test_sources = files([ - 'test_main.cpp', - 'test_splitter.cpp', - 'test_converter.cpp', - 'test_parser.cpp', - 'test_parser2_segment1.cpp', - 'test_parser2_segment2.cpp', - 'test_parser2_segment3.cpp', - 'test_parser2_segment4.cpp', - 'test_extractions.cpp', - 'test_extractions_without_fast_float.cpp', - ]) - doctest_dep = dependency('doctest') +add_project_arguments('-DDOCTEST_CONFIG_IMPLEMENT_WITH_MAIN', language: 'cpp') -test_exe = executable( - 'test_ssp', - sources: test_sources, - dependencies: [doctest_dep, ssp_dep], - cpp_args: '-lstdc++fs' - ) +tests = [ + 'parser', + 'splitter', + 'converter', + 'extractions', + 'parser2_segment1', + 'parser2_segment2', + 'parser2_segment3', + 'parser2_segment4', + 'extractions_without_fast_float', +] + +foreach name : tests + + exe = executable( + name, + 'test_' + name + '.cpp', + dependencies: [doctest_dep, ssp_dep] + ) + + test('test_' + name, exe, timeout: 60) +endforeach -test('test_ssp', test_exe)