MCPcopy Create free account
hub / github.com/RenderKit/embree / runTests

Function runTests

tutorials/external/catch.hpp:10918–10956  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10916 }
10917
10918 Catch::Totals runTests(std::shared_ptr<Config> const& config) {
10919 auto reporter = makeReporter(config);
10920
10921 RunContext context(config, std::move(reporter));
10922
10923 Totals totals;
10924
10925 context.testGroupStarting(config->name(), 1, 1);
10926
10927 TestSpec testSpec = config->testSpec();
10928
10929 auto const& allTestCases = getAllTestCasesSorted(*config);
10930 for (auto const& testCase : allTestCases) {
10931 bool matching = (!testSpec.hasFilters() && !testCase.isHidden()) ||
10932 (testSpec.hasFilters() && matchTest(testCase, testSpec, *config));
10933
10934 if (!context.aborting() && matching)
10935 totals += context.runTest(testCase);
10936 else
10937 context.reporter().skipTest(testCase);
10938 }
10939
10940 if (config->warnAboutNoTests() && totals.testCases.total() == 0) {
10941 ReusableStringStream testConfig;
10942
10943 bool first = true;
10944 for (const auto& input : config->getTestsOrTags()) {
10945 if (!first) { testConfig << ' '; }
10946 first = false;
10947 testConfig << input;
10948 }
10949
10950 context.reporter().noMatchingTestCases(testConfig.str());
10951 totals.error = -1;
10952 }
10953
10954 context.testGroupEnded(config->name(), totals, 1, 1);
10955 return totals;
10956 }
10957
10958 void applyFilenamesAsTags(Catch::IConfig const& config) {
10959 auto& tests = const_cast<std::vector<TestCase>&>(getAllTestCasesSorted(config));

Callers 1

runInternalMethod · 0.85

Calls 15

makeReporterFunction · 0.85
matchTestFunction · 0.85
testSpecMethod · 0.80
hasFiltersMethod · 0.80
isHiddenMethod · 0.80
abortingMethod · 0.80
runTestMethod · 0.80
warnAboutNoTestsMethod · 0.80
totalMethod · 0.80
testGroupStartingMethod · 0.45
nameMethod · 0.45
skipTestMethod · 0.45

Tested by

no test coverage detected