MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / runTests

Function runTests

Bcore/src/main/cpp/Dobby/tests/catch.hpp:9033–9072  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9031}
9032
9033Catch::Totals runTests(std::shared_ptr<Config> const &config) {
9034 // FixMe: Add listeners in order first, then add reporters.
9035
9036 auto reporter = makeReporter(config);
9037
9038 RunContext context(config, std::move(reporter));
9039
9040 Totals totals;
9041
9042 context.testGroupStarting(config->name(), 1, 1);
9043
9044 TestSpec testSpec = config->testSpec();
9045
9046 auto const &allTestCases = getAllTestCasesSorted(*config);
9047 for (auto const &testCase : allTestCases) {
9048 if (!context.aborting() && matchTest(testCase, testSpec, *config))
9049 totals += context.runTest(testCase);
9050 else
9051 context.reporter().skipTest(testCase);
9052 }
9053
9054 if (config->warnAboutNoTests() && totals.testCases.total() == 0) {
9055 ReusableStringStream testConfig;
9056
9057 bool first = true;
9058 for (const auto &input : config->getTestsOrTags()) {
9059 if (!first) {
9060 testConfig << ' ';
9061 }
9062 first = false;
9063 testConfig << input;
9064 }
9065
9066 context.reporter().noMatchingTestCases(testConfig.str());
9067 totals.error = -1;
9068 }
9069
9070 context.testGroupEnded(config->name(), totals, 1, 1);
9071 return totals;
9072}
9073
9074void applyFilenamesAsTags(Catch::IConfig const &config) {
9075 auto &tests = const_cast<std::vector<TestCase> &>(getAllTestCasesSorted(config));

Callers 1

runInternalMethod · 0.85

Calls 13

makeReporterFunction · 0.85
matchTestFunction · 0.85
testSpecMethod · 0.80
abortingMethod · 0.80
runTestMethod · 0.80
warnAboutNoTestsMethod · 0.80
totalMethod · 0.80
testGroupStartingMethod · 0.45
nameMethod · 0.45
skipTestMethod · 0.45
noMatchingTestCasesMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected