MCPcopy Create free account
hub / github.com/Compaile/ctrack / DebugOutputWindowReporter

Class DebugOutputWindowReporter

test/doctest.h:6441–6471  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6439
6440#ifdef DOCTEST_PLATFORM_WINDOWS
6441 struct DebugOutputWindowReporter : public ConsoleReporter
6442 {
6443 DOCTEST_THREAD_LOCAL static std::ostringstream oss;
6444
6445 DebugOutputWindowReporter(const ContextOptions& co)
6446 : ConsoleReporter(co, oss) {}
6447
6448#define DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(func, type, arg) \
6449 void func(type arg) override { \
6450 bool with_col = g_no_colors; \
6451 g_no_colors = false; \
6452 ConsoleReporter::func(arg); \
6453 if(oss.tellp() != std::streampos{}) { \
6454 DOCTEST_OUTPUT_DEBUG_STRING(oss.str().c_str()); \
6455 oss.str(""); \
6456 } \
6457 g_no_colors = with_col; \
6458 }
6459
6460 DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_run_start, DOCTEST_EMPTY, DOCTEST_EMPTY)
6461 DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_run_end, const TestRunStats&, in)
6462 DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_case_start, const TestCaseData&, in)
6463 DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_case_reenter, const TestCaseData&, in)
6464 DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_case_end, const CurrentTestCaseStats&, in)
6465 DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_case_exception, const TestCaseException&, in)
6466 DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(subcase_start, const SubcaseSignature&, in)
6467 DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(subcase_end, DOCTEST_EMPTY, DOCTEST_EMPTY)
6468 DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(log_assert, const AssertData&, in)
6469 DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(log_message, const MessageData&, in)
6470 DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_case_skipped, const TestCaseData&, in)
6471 };
6472
6473 DOCTEST_THREAD_LOCAL std::ostringstream DebugOutputWindowReporter::oss;
6474#endif // DOCTEST_PLATFORM_WINDOWS

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected