Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/tests/meson.build
blob: 95556f06d3ac2bf830feff58d4ce64d1855a90e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#              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/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/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/ToString.tests.cpp',
  'SelfTest/IntrospectiveTests/Traits.tests.cpp',
  'SelfTest/IntrospectiveTests/UniquePtr.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: [catch3_with_main, catch3],
)

test('SelfTest', self_test, args: ['--no-history'])

# The Progmasoft tests need C++20; SelfTest keeps the C++ mode it has upstream.
progmasoft_property_tests = executable(
  'ProgmasoftPropertyTests',
  [
    'Progmasoft/Generators.tests.cpp',
    'Progmasoft/Property.tests.cpp',
    'Progmasoft/ForAll.tests.cpp',
    'Progmasoft/Results.tests.cpp',
    'Progmasoft/Runner.tests.cpp',
    'Progmasoft/RunnerUnits.tests.cpp',
    'Progmasoft/RunnerPlanner.tests.cpp',
    'Progmasoft/RunnerOptions.tests.cpp',
    'Progmasoft/RunnerConfig.tests.cpp',
    'Progmasoft/RunnerAnalysis.tests.cpp',
    'Progmasoft/RunnerOutput.tests.cpp',
    'Progmasoft/Snapshot.tests.cpp',
    'Progmasoft/Stateful.tests.cpp',
    'Progmasoft/Strategy.tests.cpp',
  ],
  include_directories: '../src',
  dependencies: [catch3_with_main_dep],
  override_options: ['cpp_std=c++17'],
)

# Tests that misbehave on purpose, for the runner's integration tests.
runner_fixture = executable(
  'RunnerFixture',
  'Progmasoft/RunnerFixture.cpp',
  include_directories: '../src',
  dependencies: [catch3_with_main_dep],
  override_options: ['cpp_std=c++17'],
)

test(
  'Progmasoft_PropertyTests',
  progmasoft_property_tests,
  args: ['--no-history'],
  env: {'CATCH3_RUNNER_FIXTURE': runner_fixture.full_path()},
  depends: runner_fixture,
  timeout: 300,
)