| 2505 | void subcase_end() override { xml.endElement(); } |
| 2506 | |
| 2507 | void log_assert(const AssertData& rb) override { |
| 2508 | if(!rb.m_failed && !opt.success) |
| 2509 | return; |
| 2510 | |
| 2511 | DOCTEST_LOCK_MUTEX(mutex) |
| 2512 | |
| 2513 | xml.startElement("Expression") |
| 2514 | .writeAttribute("success", !rb.m_failed) |
| 2515 | .writeAttribute("type", assertString(rb.m_at)) |
| 2516 | .writeAttribute("filename", skipPathFromFilename(rb.m_file)) |
| 2517 | .writeAttribute("line", line(rb.m_line)); |
| 2518 | |
| 2519 | xml.scopedElement("Original").writeText(rb.m_expr); |
| 2520 | |
| 2521 | if(rb.m_threw) |
| 2522 | xml.scopedElement("Exception").writeText(rb.m_exception.c_str()); |
| 2523 | |
| 2524 | if(rb.m_at & assertType::is_throws_as) |
| 2525 | xml.scopedElement("ExpectedException").writeText(rb.m_exception_type); |
| 2526 | if(rb.m_at & assertType::is_throws_with) |
| 2527 | xml.scopedElement("ExpectedExceptionString").writeText(rb.m_exception_string.c_str()); |
| 2528 | if((rb.m_at & assertType::is_normal) && !rb.m_threw) |
| 2529 | xml.scopedElement("Expanded").writeText(rb.m_decomp.c_str()); |
| 2530 | |
| 2531 | log_contexts(); |
| 2532 | |
| 2533 | xml.endElement(); |
| 2534 | } |
| 2535 | |
| 2536 | void log_message(const MessageData& mb) override { |
| 2537 | DOCTEST_LOCK_MUTEX(mutex) |
nothing calls this directly
no test coverage detected