FastLED 3.9.15
Loading...
Searching...
No Matches

◆ testRunEnd()

void fl::test::SerialReporter::testRunEnd ( const TestStats & stats)
overridevirtual

Implements fl::test::IReporter.

Definition at line 516 of file fltest.cpp.hpp.

516 {
517 print("\n====== FL TEST: Results ======\n");
518
519 // Format stats using snprintf-style approach
520 fl::sstream ss;
521 ss << "Passed: " << stats.mTestCasesPassed
522 << "/" << stats.mTestCasesRun << " tests\n";
523 print(ss.str().c_str());
524
525 if (stats.mTestCasesSkipped > 0) {
526 fl::sstream ss_skip;
527 ss_skip << "Skipped: " << stats.mTestCasesSkipped << "\n";
528 print(ss_skip.str().c_str());
529 }
530
531 if (stats.mAssertsFailed > 0) {
532 fl::sstream ss2;
533 ss2 << "Failed assertions: " << stats.mAssertsFailed << "\n";
534 print(ss2.str().c_str());
535 }
536
537 if (stats.allPassed()) {
538 print("Status: PASS\n");
539 } else {
540 print("Status: FAIL\n");
541 }
542}
const char * c_str() const FL_NOEXCEPT
string str() const FL_NOEXCEPT
Definition strstream.h:43
void print(const char *msg) FL_NOEXCEPT

References fl::basic_string::c_str(), FL_NOEXCEPT, fl::print(), and fl::sstream::str().

+ Here is the call graph for this function: