MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/TriangleMeshDistance / runTests

Function runTests

tests/catch.hpp:10653–10688  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10651 }
10652
10653 Catch::Totals runTests(std::shared_ptr<Config> const& config) {
10654 auto reporter = makeReporter(config);
10655
10656 RunContext context(config, std::move(reporter));
10657
10658 Totals totals;
10659
10660 context.testGroupStarting(config->name(), 1, 1);
10661
10662 TestSpec testSpec = config->testSpec();
10663
10664 auto const& allTestCases = getAllTestCasesSorted(*config);
10665 for (auto const& testCase : allTestCases) {
10666 if (!context.aborting() && matchTest(testCase, testSpec, *config))
10667 totals += context.runTest(testCase);
10668 else
10669 context.reporter().skipTest(testCase);
10670 }
10671
10672 if (config->warnAboutNoTests() && totals.testCases.total() == 0) {
10673 ReusableStringStream testConfig;
10674
10675 bool first = true;
10676 for (const auto& input : config->getTestsOrTags()) {
10677 if (!first) { testConfig << ' '; }
10678 first = false;
10679 testConfig << input;
10680 }
10681
10682 context.reporter().noMatchingTestCases(testConfig.str());
10683 totals.error = -1;
10684 }
10685
10686 context.testGroupEnded(config->name(), totals, 1, 1);
10687 return totals;
10688 }
10689
10690 void applyFilenamesAsTags(Catch::IConfig const& config) {
10691 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
strMethod · 0.80
testGroupStartingMethod · 0.45
nameMethod · 0.45
skipTestMethod · 0.45
noMatchingTestCasesMethod · 0.45

Tested by

no test coverage detected