MCPcopy Create free account
hub / github.com/MikeMirzayanov/testlib / writeTestOverviewLog

Method writeTestOverviewLog

testlib.h:2548–2570  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2546 }
2547
2548 void writeTestOverviewLog() {
2549 if (!_testOverviewLogFileName.empty()) {
2550 std::string fileName(_testOverviewLogFileName);
2551 _testOverviewLogFileName = "";
2552
2553 FILE* f;
2554 bool standard_file = false;
2555 if (fileName == "stdout")
2556 f = stdout, standard_file = true;
2557 else if (fileName == "stderr")
2558 f = stderr, standard_file = true;
2559 else {
2560 f = fopen(fileName.c_str(), "wb");
2561 if (NULL == f)
2562 __testlib_fail("Validator::writeTestOverviewLog: can't write test overview log to (" + fileName + ")");
2563 }
2564 fprintf(f, "%s%s", getBoundsHitLog().c_str(), getFeaturesLog().c_str());
2565 std::fflush(f);
2566 if (!standard_file)
2567 if (std::fclose(f))
2568 __testlib_fail("Validator::writeTestOverviewLog: can't close test overview log file (" + fileName + ")");
2569 }
2570 }
2571
2572 void writeTestMarkup() {
2573 if (!_testMarkupFileName.empty()) {

Callers 1

~TestlibFinalizeGuardMethod · 0.45

Calls 1

__testlib_failFunction · 0.70

Tested by

no test coverage detected