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 649 of file fltest.cpp.hpp.
649 {
650 fl::sstream ss;
652
653
654 if (durationMs > 0) {
655
656 fl::u32 secs = durationMs / 1000;
657 fl::u32
millis = durationMs % 1000;
658 ss <<
" time=\"" << secs <<
"." << (
millis < 100 ? (
millis < 10 ?
"00" :
"0") :
"") <<
millis <<
"\"";
659 }
660
661 if (passed) {
662 ss << "/>\n";
663 } else {
664 ss << ">\n";
665 ss << " <failure message=\"Test failed\">\n";
667 ss << " </failure>\n";
668 ss << " </testcase>\n";
669 }
670
672}
string str() const FL_NOEXCEPT
static fl::string escapeXml(const char *text) FL_NOEXCEPT
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_NOEXCEPT, mCurrentTestFailures, mCurrentTestName, fl::millis(), mTestCaseResults, and fl::sstream::str().