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

Method printTotalsDivider

tests/catch.hpp:13669–13689  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13667}
13668
13669void ConsoleReporter::printTotalsDivider(Totals const& totals) {
13670 if (totals.testCases.total() > 0) {
13671 std::size_t failedRatio = makeRatio(totals.testCases.failed, totals.testCases.total());
13672 std::size_t failedButOkRatio = makeRatio(totals.testCases.failedButOk, totals.testCases.total());
13673 std::size_t passedRatio = makeRatio(totals.testCases.passed, totals.testCases.total());
13674 while (failedRatio + failedButOkRatio + passedRatio < CATCH_CONFIG_CONSOLE_WIDTH - 1)
13675 findMax(failedRatio, failedButOkRatio, passedRatio)++;
13676 while (failedRatio + failedButOkRatio + passedRatio > CATCH_CONFIG_CONSOLE_WIDTH - 1)
13677 findMax(failedRatio, failedButOkRatio, passedRatio)--;
13678
13679 stream << Colour(Colour::Error) << std::string(failedRatio, '=');
13680 stream << Colour(Colour::ResultExpectedFailure) << std::string(failedButOkRatio, '=');
13681 if (totals.testCases.allPassed())
13682 stream << Colour(Colour::ResultSuccess) << std::string(passedRatio, '=');
13683 else
13684 stream << Colour(Colour::Success) << std::string(passedRatio, '=');
13685 } else {
13686 stream << Colour(Colour::Warning) << std::string(CATCH_CONFIG_CONSOLE_WIDTH - 1, '=');
13687 }
13688 stream << '\n';
13689}
13690void ConsoleReporter::printSummaryDivider() {
13691 stream << getLineOfChars<'-'>() << '\n';
13692}

Callers

nothing calls this directly

Calls 4

makeRatioFunction · 0.85
ColourClass · 0.85
totalMethod · 0.80
allPassedMethod · 0.80

Tested by

no test coverage detected