mirror of
https://github.com/red0124/ssp.git
synced 2025-01-23 13:05:20 +01:00
Update test meson.build
This commit is contained in:
parent
19538597e5
commit
5963df5ffd
@ -34,7 +34,8 @@ enable_testing()
|
|||||||
|
|
||||||
foreach(name IN ITEMS test_splitter test_parser test_converter test_extractions
|
foreach(name IN ITEMS test_splitter test_parser test_converter test_extractions
|
||||||
test_parser2_segment1 test_parser2_segment2
|
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")
|
add_executable("${name}" "${name}.cpp")
|
||||||
target_link_libraries("${name}" PRIVATE ssp::ssp fast_float
|
target_link_libraries("${name}" PRIVATE ssp::ssp fast_float
|
||||||
doctest::doctest)
|
doctest::doctest)
|
||||||
|
@ -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')
|
doctest_dep = dependency('doctest')
|
||||||
|
add_project_arguments('-DDOCTEST_CONFIG_IMPLEMENT_WITH_MAIN', language: 'cpp')
|
||||||
|
|
||||||
test_exe = executable(
|
tests = [
|
||||||
'test_ssp',
|
'parser',
|
||||||
sources: test_sources,
|
'splitter',
|
||||||
dependencies: [doctest_dep, ssp_dep],
|
'converter',
|
||||||
cpp_args: '-lstdc++fs'
|
'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_ssp', test_exe)
|
test('test_' + name, exe, timeout: 60)
|
||||||
|
endforeach
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user