MCPcopy Create free account
hub / github.com/ChaiScript/ChaiScript / printRemainingMessages

Method printRemainingMessages

unittests/catch.hpp:11478–11501  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11476 }
11477
11478 void printRemainingMessages(Colour::Code colour = dimColour()) {
11479 if (itMessage == messages.end())
11480 return;
11481
11482 // using messages.end() directly yields (or auto) compilation error:
11483 std::vector<MessageInfo>::const_iterator itEnd = messages.end();
11484 const std::size_t N = static_cast<std::size_t>(std::distance(itMessage, itEnd));
11485
11486 {
11487 Colour colourGuard(colour);
11488 stream << " with " << pluralise(N, "message") << ':';
11489 }
11490
11491 for (; itMessage != itEnd; ) {
11492 // If this assertion is a warning ignore any INFO messages
11493 if (printInfoMessages || itMessage->type != ResultWas::Info) {
11494 stream << " '" << itMessage->message << '\'';
11495 if (++itMessage != itEnd) {
11496 Colour colourGuard(dimColour());
11497 stream << " and";
11498 }
11499 }
11500 }
11501 }
11502
11503private:
11504 std::ostream& stream;

Callers

nothing calls this directly

Calls 3

dimColourFunction · 0.85
pluraliseClass · 0.85
endMethod · 0.45

Tested by

no test coverage detected