MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / log_message

Method log_message

tests/framework/src/doctest.cpp:2819–2834  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2817 }
2818
2819 void log_message(const MessageData& mb) override {
2820 if(mb.m_severity & assertType::is_warn) // report only failures
2821 return;
2822
2823 DOCTEST_LOCK_MUTEX(mutex)
2824
2825 std::ostringstream os;
2826 os << skipPathFromFilename(mb.m_file) << (opt.gnu_file_line ? ":" : "(")
2827 << line(mb.m_line) << (opt.gnu_file_line ? ":" : "):") << std::endl;
2828
2829 os << mb.m_string.c_str() << "\n";
2830 log_contexts(os);
2831
2832 testCaseData.addFailure(mb.m_string.c_str(),
2833 mb.m_severity & assertType::is_check ? "FAIL_CHECK" : "FAIL", os.str());
2834 }
2835
2836 void test_case_skipped(const TestCaseData&) override {}
2837

Callers

nothing calls this directly

Calls 5

skipPathFromFilenameFunction · 0.85
addFailureMethod · 0.80
lineClass · 0.50
c_strMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected