Called when a test case ends.
- Parameters
-
| passed | Whether the test passed |
| durationMs | Duration of the test in milliseconds (0 if no timer available) |
Implements fl::test::IReporter.
Definition at line 658 of file fltest.cpp.hpp.
658 {
659 fl::sstream ss;
661
662
663 if (durationMs > 0) {
664
665 fl::u32 secs = durationMs / 1000;
666 fl::u32
millis = durationMs % 1000;
667 ss <<
" time=\"" << secs <<
"." << (
millis < 100 ? (
millis < 10 ?
"00" :
"0") :
"") <<
millis <<
"\"";
668 }
669
670 if (passed) {
671 ss << "/>\n";
672 } else {
673 ss << ">\n";
674 ss << " <failure message=\"Test failed\">\n";
676 ss << " </failure>\n";
677 ss << " </testcase>\n";
678 }
679
681}
string str() const FL_NO_EXCEPT
static fl::string escapeXml(const char *text) FL_NO_EXCEPT
fl::vector< fl::string > mTestCaseResults
fl::string mCurrentTestName
fl::string mCurrentTestFailures
fl::u32 millis()
Universal millisecond timer - returns milliseconds since system startup.
References escapeXml(), fl::FL_NO_EXCEPT, mCurrentTestFailures, mCurrentTestName, fl::millis(), mTestCaseResults, and fl::sstream::str().