Files
Catch2/tests/meson.build
Martin Hořeňovský 9f0120a5e9 Support for constexpr matchers in C++20 (P0784)
To make this all work, I had to remove the stringification cache
from matchers. In theory, this can cause performance penalty in
cases where single matcher instance is stringified multiple times,
but in practice this does not happen much, and the difference is
surprisingly small anyway, because the performance of stringification
is already horrible and full of allocating strings just to throw
them away.

The matcher combinators need P2738 from C++26 to be `constexpr`.

TODO: close related issues
2026-05-11 21:19:31 +02:00

79 lines
3.3 KiB
Meson

# Copyright Catch2 Authors
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE.txt or copy at
# https://www.boost.org/LICENSE_1_0.txt)
# SPDX-License-Identifier: BSL-1.0
# define the sources of the self test
# Please keep these ordered alphabetically
self_test_sources = files(
'SelfTest/helpers/parse_test_spec.cpp',
'SelfTest/IntrospectiveTests/Algorithms.tests.cpp',
'SelfTest/IntrospectiveTests/Clara.tests.cpp',
'SelfTest/IntrospectiveTests/CmdLine.tests.cpp',
'SelfTest/IntrospectiveTests/CmdLineHelpers.tests.cpp',
'SelfTest/IntrospectiveTests/ColourImpl.tests.cpp',
'SelfTest/IntrospectiveTests/Details.tests.cpp',
'SelfTest/IntrospectiveTests/FloatingPoint.tests.cpp',
'SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp',
'SelfTest/IntrospectiveTests/Integer.tests.cpp',
'SelfTest/IntrospectiveTests/InternalBenchmark.tests.cpp',
'SelfTest/IntrospectiveTests/Parse.tests.cpp',
'SelfTest/IntrospectiveTests/PartTracker.tests.cpp',
'SelfTest/IntrospectiveTests/RandomNumberGeneration.tests.cpp',
'SelfTest/IntrospectiveTests/Reporters.tests.cpp',
'SelfTest/IntrospectiveTests/Sharding.tests.cpp',
'SelfTest/IntrospectiveTests/Stream.tests.cpp',
'SelfTest/IntrospectiveTests/String.tests.cpp',
'SelfTest/IntrospectiveTests/StringManip.tests.cpp',
'SelfTest/IntrospectiveTests/Tag.tests.cpp',
'SelfTest/IntrospectiveTests/TestCaseInfoHasher.tests.cpp',
'SelfTest/IntrospectiveTests/TestSpec.tests.cpp',
'SelfTest/IntrospectiveTests/TestSpecParser.tests.cpp',
'SelfTest/IntrospectiveTests/TextFlow.tests.cpp',
'SelfTest/IntrospectiveTests/ToString.tests.cpp',
'SelfTest/IntrospectiveTests/Traits.tests.cpp',
'SelfTest/IntrospectiveTests/UniquePtr.tests.cpp',
'SelfTest/IntrospectiveTests/Xml.tests.cpp',
'SelfTest/TestRegistrations.cpp',
'SelfTest/TimingTests/Sleep.tests.cpp',
'SelfTest/UsageTests/Approx.tests.cpp',
'SelfTest/UsageTests/BDD.tests.cpp',
'SelfTest/UsageTests/Benchmark.tests.cpp',
'SelfTest/UsageTests/Class.tests.cpp',
'SelfTest/UsageTests/Compilation.tests.cpp',
'SelfTest/UsageTests/Condition.tests.cpp',
'SelfTest/UsageTests/Decomposition.tests.cpp',
'SelfTest/UsageTests/EnumToString.tests.cpp',
'SelfTest/UsageTests/Exception.tests.cpp',
'SelfTest/UsageTests/Generators.tests.cpp',
'SelfTest/UsageTests/Matchers.tests.cpp',
'SelfTest/UsageTests/MatchersConstexpr.tests.cpp',
'SelfTest/UsageTests/MatchersRanges.tests.cpp',
'SelfTest/UsageTests/Message.tests.cpp',
'SelfTest/UsageTests/Misc.tests.cpp',
'SelfTest/UsageTests/ToStringByte.tests.cpp',
'SelfTest/UsageTests/ToStringChrono.tests.cpp',
'SelfTest/UsageTests/ToStringGeneral.tests.cpp',
'SelfTest/UsageTests/ToStringOptional.tests.cpp',
'SelfTest/UsageTests/ToStringPair.tests.cpp',
'SelfTest/UsageTests/ToStringTuple.tests.cpp',
'SelfTest/UsageTests/ToStringVariant.tests.cpp',
'SelfTest/UsageTests/ToStringVector.tests.cpp',
'SelfTest/UsageTests/ToStringWhich.tests.cpp',
'SelfTest/UsageTests/Tricky.tests.cpp',
'SelfTest/UsageTests/VariadicMacros.tests.cpp',
)
# This isn't as good as the CMake tests, but it proves that we've
# actually put something in the library files.
self_test = executable(
'SelfTest',
self_test_sources,
include_directories: ['../src', './SelfTest'],
link_with: [catch2_with_main, catch2],
)
test('SelfTest', self_test)