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

◆ testRunEnd()

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

Implements fl::test::IReporter.

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

618 {
619 if (!mOutput) return;
620
621 fl::sstream ss;
622
623 // XML header
624 ss << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
625
626 // Testsuite element with summary
627 ss << "<testsuite name=\"" << escapeXml(mSuiteName) << "\" ";
628 ss << "tests=\"" << stats.mTestCasesRun << "\" ";
629 ss << "failures=\"" << stats.mTestCasesFailed << "\" ";
630 ss << "errors=\"0\" ";
631 ss << "skipped=\"" << stats.mTestCasesSkipped << "\">\n";
632
633 // Add all test case results
634 for (fl::size i = 0; i < mTestCaseResults.size(); ++i) {
635 ss << mTestCaseResults[i];
636 }
637
638 ss << "</testsuite>\n";
639
640 *mOutput = ss.str();
641}
string str() const FL_NOEXCEPT
Definition strstream.h:43
fl::string * mOutput
Definition fltest.h:574
static fl::string escapeXml(const char *text) FL_NOEXCEPT
const char * mSuiteName
Definition fltest.h:575
fl::vector< fl::string > mTestCaseResults
Definition fltest.h:581

References escapeXml(), FL_NOEXCEPT, mOutput, mSuiteName, mTestCaseResults, and fl::sstream::str().

+ Here is the call graph for this function: