FastLED 3.10.6
Loading...
Searching...
No Matches

◆ testCaseEnd()

void fl::test::TAPReporter::testCaseEnd ( bool passed,
fl::u32 durationMs = 0 )
overridevirtual

Called when a test case ends.

Parameters
passedWhether the test passed
durationMsDuration of the test in milliseconds (0 if no timer available)

Implements fl::test::IReporter.

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

900 {
901 fl::sstream ss;
902
903 if (passed) {
904 ss << "ok " << mTestNumber << " - " << mCurrentTestName;
905 } else {
906 ss << "not ok " << mTestNumber << " - " << mCurrentTestName;
907 }
908
909 // TAP supports duration via directive (non-standard but widely recognized)
910 if (durationMs > 0) {
911 ss << " # (" << durationMs << " ms)";
912 }
913 output(ss.str().c_str());
914
915 // Output diagnostics for failed tests
916 for (fl::size i = 0; i < mDiagnostics.size(); ++i) {
917 fl::sstream diag;
918 diag << "# " << mDiagnostics[i];
919 output(diag.str().c_str());
920 }
921}
const char * c_str() const FL_NO_EXCEPT
string str() const FL_NO_EXCEPT
Definition strstream.h:43
fl::string mCurrentTestName
Definition fltest.h:676
void output(const char *line) FL_NO_EXCEPT
fl::vector< fl::string > mDiagnostics
Definition fltest.h:678

References fl::basic_string::c_str(), fl::FL_NO_EXCEPT, mCurrentTestName, mDiagnostics, mTestNumber, output(), and fl::sstream::str().

+ Here is the call graph for this function: