tomlplusplus/tests/meson.build

133 lines
2.9 KiB
Meson
Raw Normal View History

new file: .circleci/config.yml new file: .editorconfig new file: .gitattributes new file: .gitignore new file: .gitmodules new file: LICENSE new file: README.md new file: examples/example.cpp new file: examples/example.toml new file: examples/meson.build new file: include/toml++/toml.h new file: include/toml++/toml_array.h new file: include/toml++/toml_common.h new file: include/toml++/toml_formatter.h new file: include/toml++/toml_node.h new file: include/toml++/toml_node_view.h new file: include/toml++/toml_parser.h new file: include/toml++/toml_table.h new file: include/toml++/toml_utf8.h new file: include/toml++/toml_utf8_generated.h new file: include/toml++/toml_value.h new file: meson.build new file: python/ci_single_header_check.py new file: python/generate_single_header.py new file: python/generate_unicode_functions.py new file: tests/catch2 new file: tests/catch2.h new file: tests/lifetimes.cpp new file: tests/main.cpp new file: tests/meson.build new file: tests/parsing_arrays.cpp new file: tests/parsing_booleans.cpp new file: tests/parsing_comments.cpp new file: tests/parsing_dates_and_times.cpp new file: tests/parsing_floats.cpp new file: tests/parsing_integers.cpp new file: tests/parsing_key_value_pairs.cpp new file: tests/parsing_spec_example.cpp new file: tests/parsing_strings.cpp new file: tests/parsing_tables.cpp new file: tests/tests.cpp new file: tests/tests.h new file: toml.hpp new file: vs/.runsettings new file: vs/example.vcxproj new file: vs/test_char.vcxproj new file: vs/test_char8.vcxproj new file: vs/test_char8_noexcept.vcxproj new file: vs/test_char_noexcept.vcxproj new file: vs/test_strict_char.vcxproj new file: vs/test_strict_char8.vcxproj new file: vs/test_strict_char8_noexcept.vcxproj new file: vs/test_strict_char_noexcept.vcxproj new file: vs/toml++.natvis new file: vs/toml++.props new file: vs/toml++.sln new file: vs/toml++.vcxproj new file: vs/toml++.vcxproj.filters
2020-01-04 14:21:38 +00:00
test_sources = [
'conformance_burntsushi_invalid.cpp',
'conformance_burntsushi_valid.cpp',
'conformance_iarna_invalid.cpp',
'conformance_iarna_valid.cpp',
'impl_toml.cpp',
'impl_catch2.cpp',
'tests.cpp',
'parsing_floats.cpp',
new file: .circleci/config.yml new file: .editorconfig new file: .gitattributes new file: .gitignore new file: .gitmodules new file: LICENSE new file: README.md new file: examples/example.cpp new file: examples/example.toml new file: examples/meson.build new file: include/toml++/toml.h new file: include/toml++/toml_array.h new file: include/toml++/toml_common.h new file: include/toml++/toml_formatter.h new file: include/toml++/toml_node.h new file: include/toml++/toml_node_view.h new file: include/toml++/toml_parser.h new file: include/toml++/toml_table.h new file: include/toml++/toml_utf8.h new file: include/toml++/toml_utf8_generated.h new file: include/toml++/toml_value.h new file: meson.build new file: python/ci_single_header_check.py new file: python/generate_single_header.py new file: python/generate_unicode_functions.py new file: tests/catch2 new file: tests/catch2.h new file: tests/lifetimes.cpp new file: tests/main.cpp new file: tests/meson.build new file: tests/parsing_arrays.cpp new file: tests/parsing_booleans.cpp new file: tests/parsing_comments.cpp new file: tests/parsing_dates_and_times.cpp new file: tests/parsing_floats.cpp new file: tests/parsing_integers.cpp new file: tests/parsing_key_value_pairs.cpp new file: tests/parsing_spec_example.cpp new file: tests/parsing_strings.cpp new file: tests/parsing_tables.cpp new file: tests/tests.cpp new file: tests/tests.h new file: toml.hpp new file: vs/.runsettings new file: vs/example.vcxproj new file: vs/test_char.vcxproj new file: vs/test_char8.vcxproj new file: vs/test_char8_noexcept.vcxproj new file: vs/test_char_noexcept.vcxproj new file: vs/test_strict_char.vcxproj new file: vs/test_strict_char8.vcxproj new file: vs/test_strict_char8_noexcept.vcxproj new file: vs/test_strict_char_noexcept.vcxproj new file: vs/toml++.natvis new file: vs/toml++.props new file: vs/toml++.sln new file: vs/toml++.vcxproj new file: vs/toml++.vcxproj.filters
2020-01-04 14:21:38 +00:00
'parsing_arrays.cpp',
'parsing_booleans.cpp',
'parsing_comments.cpp',
'parsing_dates_and_times.cpp',
'parsing_integers.cpp',
'parsing_key_value_pairs.cpp',
'parsing_spec_example.cpp',
'parsing_strings.cpp',
'parsing_tables.cpp',
'manipulating_arrays.cpp',
'manipulating_tables.cpp',
'manipulating_values.cpp',
'unicode.cpp',
'unicode_generated.cpp',
'windows_compat.cpp'
new file: .circleci/config.yml new file: .editorconfig new file: .gitattributes new file: .gitignore new file: .gitmodules new file: LICENSE new file: README.md new file: examples/example.cpp new file: examples/example.toml new file: examples/meson.build new file: include/toml++/toml.h new file: include/toml++/toml_array.h new file: include/toml++/toml_common.h new file: include/toml++/toml_formatter.h new file: include/toml++/toml_node.h new file: include/toml++/toml_node_view.h new file: include/toml++/toml_parser.h new file: include/toml++/toml_table.h new file: include/toml++/toml_utf8.h new file: include/toml++/toml_utf8_generated.h new file: include/toml++/toml_value.h new file: meson.build new file: python/ci_single_header_check.py new file: python/generate_single_header.py new file: python/generate_unicode_functions.py new file: tests/catch2 new file: tests/catch2.h new file: tests/lifetimes.cpp new file: tests/main.cpp new file: tests/meson.build new file: tests/parsing_arrays.cpp new file: tests/parsing_booleans.cpp new file: tests/parsing_comments.cpp new file: tests/parsing_dates_and_times.cpp new file: tests/parsing_floats.cpp new file: tests/parsing_integers.cpp new file: tests/parsing_key_value_pairs.cpp new file: tests/parsing_spec_example.cpp new file: tests/parsing_strings.cpp new file: tests/parsing_tables.cpp new file: tests/tests.cpp new file: tests/tests.h new file: toml.hpp new file: vs/.runsettings new file: vs/example.vcxproj new file: vs/test_char.vcxproj new file: vs/test_char8.vcxproj new file: vs/test_char8_noexcept.vcxproj new file: vs/test_char_noexcept.vcxproj new file: vs/test_strict_char.vcxproj new file: vs/test_strict_char8.vcxproj new file: vs/test_strict_char8_noexcept.vcxproj new file: vs/test_strict_char_noexcept.vcxproj new file: vs/toml++.natvis new file: vs/toml++.props new file: vs/toml++.sln new file: vs/toml++.vcxproj new file: vs/toml++.vcxproj.filters
2020-01-04 14:21:38 +00:00
]
compiler_supports_char8_strings = compiler.compiles('''
#include <string_view>
#include <string>
using namespace std::string_view_literals;
std::u8string func()
{
return std::u8string{ u8"this is a test."sv };
}
''',
name : 'char8 string check',
args : [ '-std=c++2a' ]
)
character_types = ['char', 'char8']
exception_modes = [ true, false ]
unreleased_feature_modes = [ true, false ]
tloptional_modes = [ true, false ]
executables = []
counter = 0
foreach character_type : character_types
if character_type == 'char8' and not compiler_supports_char8_strings
continue
endif
foreach exceptions : exception_modes
foreach unreleased_features : unreleased_feature_modes
foreach tloptional : tloptional_modes
if tloptional and not (character_type =='char' and unreleased_features and exceptions)
continue
endif
name = character_type
overrides = []
args = []
if character_type =='char8'
overrides += 'cpp_std=none'
args += '-DTOML_CHAR_8_STRINGS=1'
args += '-std=c++2a'
endif
if unreleased_features
args += '-DTOML_UNRELEASED_FEATURES=1'
else
name = name + '_strict'
args += '-DTOML_UNRELEASED_FEATURES=0'
endif
if not exceptions
name = name + '_noexcept'
overrides += 'cpp_eh=none'
endif
if tloptional
name = name + '_tlopt'
args += '-DUSE_TARTANLLAMA_OPTIONAL=1'
endif
args += '-DTEST_BUILD_ID=@0@'.format(counter)
if compiler.get_id() == 'gcc'
args += '-Wno-padded'
args += '-Wno-float-equal'
endif
if compiler.get_id() == 'clang'
args += '-Wno-padded'
args += '-Wno-float-equal'
args += '-Wno-double-promotion'
endif
executables += [[
name,
executable(
name,
test_sources,
include_directories : inc,
cpp_args : args,
override_options : overrides
)
]]
counter = counter + 1
endforeach # tloptional_modes
endforeach # unreleased_feature_modes
endforeach # exception_modes
endforeach # character_type
locales = [
'C',
'en_US.utf8',
'ja_JP.utf8',
'it_IT.utf8',
'tr_TR.utf8',
'fi_FI.utf8',
'fr_FR.utf8',
'zh_CN.utf8',
'de_DE.utf8'
]
foreach locale : locales
foreach executable : executables
test(locale + '_' + executable[0], executable[1], env : ['LC_ALL=' + locale])
endforeach
endforeach