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

Method log_assert

tests/framework/src/doctest.cpp:2804–2817  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2802 void subcase_end() override {}
2803
2804 void log_assert(const AssertData& rb) override {
2805 if(!rb.m_failed) // report only failures & ignore the `success` option
2806 return;
2807
2808 DOCTEST_LOCK_MUTEX(mutex)
2809
2810 std::ostringstream os;
2811 os << skipPathFromFilename(rb.m_file) << (opt.gnu_file_line ? ":" : "(")
2812 << line(rb.m_line) << (opt.gnu_file_line ? ":" : "):") << std::endl;
2813
2814 fulltext_log_assert_to_stream(os, rb);
2815 log_contexts(os);
2816 testCaseData.addFailure(rb.m_decomp.c_str(), assertString(rb.m_at), os.str());
2817 }
2818
2819 void log_message(const MessageData& mb) override {
2820 if(mb.m_severity & assertType::is_warn) // report only failures

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected