MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / CustomFormat

Method CustomFormat

test/testerrorlogger.cpp:389–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

387 }
388
389 void CustomFormat() const {
390 std::list<ErrorMessage::FileLocation> locs(1, fooCpp5);
391 ErrorMessage msg(std::move(locs), "", Severity::error, "Programming error.\nVerbose error", "errorId", Certainty::normal);
392 ASSERT_EQUALS(1, msg.callStack.size());
393 ASSERT_EQUALS("Programming error.", msg.shortMessage());
394 ASSERT_EQUALS("Verbose error", msg.verboseMessage());
395 ASSERT_EQUALS("foo.cpp:5,error,errorId,Programming error.", msg.toString(false, "{file}:{line},{severity},{id},{message}", ""));
396 ASSERT_EQUALS("foo.cpp:5,error,errorId,Verbose error", msg.toString(true, "{file}:{line},{severity},{id},{message}", ""));
397 }
398
399 void CustomFormat2() const {
400 std::list<ErrorMessage::FileLocation> locs(1, fooCpp5);

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected