| 2529 | void subcase_end() override { xml.endElement(); } |
| 2530 | |
| 2531 | void log_assert(const AssertData& rb) override { |
| 2532 | if(!rb.m_failed && !opt.success) |
| 2533 | return; |
| 2534 | |
| 2535 | DOCTEST_LOCK_MUTEX(mutex) |
| 2536 | |
| 2537 | xml.startElement("Expression") |
| 2538 | .writeAttribute("success", !rb.m_failed) |
| 2539 | .writeAttribute("type", assertString(rb.m_at)) |
| 2540 | .writeAttribute("filename", skipPathFromFilename(rb.m_file)) |
| 2541 | .writeAttribute("line", line(rb.m_line)); |
| 2542 | |
| 2543 | xml.scopedElement("Original").writeText(rb.m_expr); |
| 2544 | |
| 2545 | if(rb.m_threw) |
| 2546 | xml.scopedElement("Exception").writeText(rb.m_exception.c_str()); |
| 2547 | |
| 2548 | if(rb.m_at & assertType::is_throws_as) |
| 2549 | xml.scopedElement("ExpectedException").writeText(rb.m_exception_type); |
| 2550 | if(rb.m_at & assertType::is_throws_with) |
| 2551 | xml.scopedElement("ExpectedExceptionString").writeText(rb.m_exception_string.c_str()); |
| 2552 | if((rb.m_at & assertType::is_normal) && !rb.m_threw) |
| 2553 | xml.scopedElement("Expanded").writeText(rb.m_decomp.c_str()); |
| 2554 | |
| 2555 | log_contexts(); |
| 2556 | |
| 2557 | xml.endElement(); |
| 2558 | } |
| 2559 | |
| 2560 | void log_message(const MessageData& mb) override { |
| 2561 | DOCTEST_LOCK_MUTEX(mutex) |
nothing calls this directly
no test coverage detected