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

Method ErrorMessageVerbose

test/testerrorlogger.cpp:270–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268 }
269
270 void ErrorMessageVerbose() const {
271 std::list<ErrorMessage::FileLocation> locs(1, fooCpp5);
272 ErrorMessage msg(std::move(locs), "", Severity::error, "Programming error.\nVerbose error", "errorId", Certainty::normal);
273 ASSERT_EQUALS(1, msg.callStack.size());
274 ASSERT_EQUALS("Programming error.", msg.shortMessage());
275 ASSERT_EQUALS("Verbose error", msg.verboseMessage());
276 ASSERT_EQUALS("[foo.cpp:5]: (error) Programming error.", msg.toString(false, templateFormat, ""));
277 ASSERT_EQUALS("[foo.cpp:5]: (error) Verbose error", msg.toString(true, templateFormat, ""));
278 }
279
280 void ErrorMessageVerboseLocations() const {
281 std::list<ErrorMessage::FileLocation> locs = { fooCpp5, barCpp8 };

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected