| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
// Copyright Catch2 Authors |
|
3
|
|
|
|
|
|
|
// Distributed under the Boost Software License, Version 1.0. |
|
4
|
|
|
|
|
|
|
// (See accompanying file LICENSE_1_0.txt or copy at |
|
5
|
|
|
|
|
|
|
// https://www.boost.org/LICENSE_1_0.txt) |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
// SPDX-License-Identifier: BSL-1.0 |
|
8
|
|
|
|
|
|
|
#ifndef CATCH_CONFIG_HPP_INCLUDED |
|
9
|
|
|
|
|
|
|
#define CATCH_CONFIG_HPP_INCLUDED |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
#include |
|
12
|
|
|
|
|
|
|
#include |
|
13
|
|
|
|
|
|
|
#include |
|
14
|
|
|
|
|
|
|
#include |
|
15
|
|
|
|
|
|
|
#include |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
#include |
|
18
|
|
|
|
|
|
|
#include |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
namespace Catch { |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
struct IStream; |
|
23
|
|
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
struct ConfigData { |
|
25
|
|
|
|
|
|
|
bool listTests = false; |
|
26
|
|
|
|
|
|
|
bool listTags = false; |
|
27
|
|
|
|
|
|
|
bool listReporters = false; |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
bool showSuccessfulTests = false; |
|
30
|
|
|
|
|
|
|
bool shouldDebugBreak = false; |
|
31
|
|
|
|
|
|
|
bool noThrow = false; |
|
32
|
|
|
|
|
|
|
bool showHelp = false; |
|
33
|
|
|
|
|
|
|
bool showInvisibles = false; |
|
34
|
|
|
|
|
|
|
bool filenamesAsTags = false; |
|
35
|
|
|
|
|
|
|
bool libIdentify = false; |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
int abortAfter = -1; |
|
38
|
5
|
50
|
|
|
|
|
uint32_t rngSeed = generateRandomSeed(GenerateFrom::Default); |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
unsigned int shardCount = 1; |
|
41
|
|
|
|
|
|
|
unsigned int shardIndex = 0; |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
bool benchmarkNoAnalysis = false; |
|
44
|
|
|
|
|
|
|
unsigned int benchmarkSamples = 100; |
|
45
|
|
|
|
|
|
|
double benchmarkConfidenceInterval = 0.95; |
|
46
|
|
|
|
|
|
|
unsigned int benchmarkResamples = 100000; |
|
47
|
|
|
|
|
|
|
std::chrono::milliseconds::rep benchmarkWarmupTime = 100; |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Verbosity verbosity = Verbosity::Normal; |
|
50
|
|
|
|
|
|
|
WarnAbout::What warnings = WarnAbout::Nothing; |
|
51
|
|
|
|
|
|
|
ShowDurations showDurations = ShowDurations::DefaultForReporter; |
|
52
|
|
|
|
|
|
|
double minDuration = -1; |
|
53
|
|
|
|
|
|
|
TestRunOrder runOrder = TestRunOrder::Declared; |
|
54
|
|
|
|
|
|
|
UseColour useColour = UseColour::Auto; |
|
55
|
|
|
|
|
|
|
WaitForKeypress::When waitForKeypress = WaitForKeypress::Never; |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
std::string outputFilename; |
|
58
|
|
|
|
|
|
|
std::string name; |
|
59
|
|
|
|
|
|
|
std::string processName; |
|
60
|
|
|
|
|
|
|
#ifndef CATCH_CONFIG_DEFAULT_REPORTER |
|
61
|
|
|
|
|
|
|
#define CATCH_CONFIG_DEFAULT_REPORTER "console" |
|
62
|
|
|
|
|
|
|
#endif |
|
63
|
|
|
|
|
|
|
std::string reporterName = CATCH_CONFIG_DEFAULT_REPORTER; |
|
64
|
|
|
|
|
|
|
#undef CATCH_CONFIG_DEFAULT_REPORTER |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
std::vector testsOrTags; |
|
67
|
|
|
|
|
|
|
std::vector sectionsToRun; |
|
68
|
|
|
|
|
|
|
}; |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
class Config : public IConfig { |
|
72
|
|
|
|
|
|
|
public: |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Config() = default; |
|
75
|
|
|
|
|
|
|
Config( ConfigData const& data ); |
|
76
|
|
|
|
|
|
|
~Config() override; // = default in the cpp file |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
std::string const& getFilename() const; |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
bool listTests() const; |
|
81
|
|
|
|
|
|
|
bool listTags() const; |
|
82
|
|
|
|
|
|
|
bool listReporters() const; |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
std::string const& getReporterName() const; |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
std::vector const& getTestsOrTags() const override; |
|
87
|
|
|
|
|
|
|
std::vector const& getSectionsToRun() const override; |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
TestSpec const& testSpec() const override; |
|
90
|
|
|
|
|
|
|
bool hasTestFilters() const override; |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
bool showHelp() const; |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
// IConfig interface |
|
95
|
|
|
|
|
|
|
bool allowThrows() const override; |
|
96
|
|
|
|
|
|
|
std::ostream& stream() const override; |
|
97
|
|
|
|
|
|
|
StringRef name() const override; |
|
98
|
|
|
|
|
|
|
bool includeSuccessfulResults() const override; |
|
99
|
|
|
|
|
|
|
bool warnAboutMissingAssertions() const override; |
|
100
|
|
|
|
|
|
|
bool warnAboutNoTests() const override; |
|
101
|
|
|
|
|
|
|
ShowDurations showDurations() const override; |
|
102
|
|
|
|
|
|
|
double minDuration() const override; |
|
103
|
|
|
|
|
|
|
TestRunOrder runOrder() const override; |
|
104
|
|
|
|
|
|
|
uint32_t rngSeed() const override; |
|
105
|
|
|
|
|
|
|
unsigned int shardCount() const override; |
|
106
|
|
|
|
|
|
|
unsigned int shardIndex() const override; |
|
107
|
|
|
|
|
|
|
UseColour useColour() const override; |
|
108
|
|
|
|
|
|
|
bool shouldDebugBreak() const override; |
|
109
|
|
|
|
|
|
|
int abortAfter() const override; |
|
110
|
|
|
|
|
|
|
bool showInvisibles() const override; |
|
111
|
|
|
|
|
|
|
Verbosity verbosity() const override; |
|
112
|
|
|
|
|
|
|
bool benchmarkNoAnalysis() const override; |
|
113
|
|
|
|
|
|
|
int benchmarkSamples() const override; |
|
114
|
|
|
|
|
|
|
double benchmarkConfidenceInterval() const override; |
|
115
|
|
|
|
|
|
|
unsigned int benchmarkResamples() const override; |
|
116
|
|
|
|
|
|
|
std::chrono::milliseconds benchmarkWarmupTime() const override; |
|
117
|
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
private: |
|
119
|
|
|
|
|
|
|
ConfigData m_data; |
|
120
|
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
Detail::unique_ptr m_stream; |
|
122
|
|
|
|
|
|
|
TestSpec m_testSpec; |
|
123
|
|
|
|
|
|
|
bool m_hasTestFilters = false; |
|
124
|
|
|
|
|
|
|
}; |
|
125
|
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
} // end namespace Catch |
|
127
|
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
#endif // CATCH_CONFIG_HPP_INCLUDED |