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

◆ run_test()

template<typename TestFunc>
void simd_test::run_test ( const char * test_name,
TestFunc test_func,
fl::vector< TestResult > & results,
int & total_tests,
int & passed_tests,
int & failed_tests )

Run a single test and record result.

Parameters
test_nameName of the test
test_funcTest function to execute (takes TestResult& parameter)
resultsVector to store test results
total_testsTotal test counter (incremented)
passed_testsPassed test counter (incremented on pass)
failed_testsFailed test counter (incremented on fail)

Definition at line 47 of file test_helpers.h.

49 {
51 TestResult result(test_name);
52
53 // Execute test function
54 test_func(result);
55
56 // Update statistics
57 if (result.passed) {
59 } else {
61 }
62
63 // Print result
64 print_test_result(result);
65
66 // Store result
67 results.push_back(result);
68}
int passed_tests
Definition SIMD.ino:75
int failed_tests
Definition SIMD.ino:76
int total_tests
Definition SIMD.ino:74
void push_back(const T &value) FL_NOEXCEPT
Definition vector.h:624
void print_test_result(const TestResult &result)
Print test result to serial.
Stores the result of a single SIMD test.
Definition test_result.h:10

References failed_tests, passed_tests, print_test_result(), fl::vector< T >::push_back(), and total_tests.

Referenced by setup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: