FastLED 3.10.8
Loading...
Searching...
No Matches

◆ listTests()

fl::size fl::test::TestContext::listTests ( const char * filter = nullptr) const

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

140 {
141 fl::size count = 0;
142 fl::printf("\nRegistered tests:\n");
143 fl::printf("----------------\n");
144
145 for (fl::size i = 0; i < mTestCases.size(); ++i) {
146 // Apply filter if provided
147 if (filter && filter[0] != '\0') {
148 if (!matchesFilter(mTestCases[i].mName.c_str(), filter)) {
149 continue;
150 }
151 }
152 count++;
153 fl::printf(" [%u] %s\n", static_cast<fl::u32>(count), mTestCases[i].mName.c_str());
154 fl::printf(" File: %s:%d\n", mTestCases[i].mFile, mTestCases[i].mLine);
155 }
156
157 fl::printf("----------------\n");
158 fl::printf("Total: %u tests\n\n", static_cast<fl::u32>(count));
159 return count;
160}
fl::vector< TestCaseInfo > mTestCases
Definition fltest.h:251
bool matchesFilter(const char *name, const char *filter) const FL_NO_EXCEPT
void printf(const char *format) FL_NO_EXCEPT

References fl::FL_NO_EXCEPT, matchesFilter(), mTestCases, and fl::printf().

+ Here is the call graph for this function: