MCPcopy Create free account
hub / github.com/FastLED/FastLED / print_summary

Function print_summary

examples/SIMD/test_helpers.cpp:58–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56// ============================================================================
57
58void print_summary(const fl::vector<TestResult>& test_results,
59 int total_tests, int passed_tests, int failed_tests) {
60 fl::sstream ss;
61
62 ss << "\n╔════════════════════════════════════════════════════════════════╗\n";
63 ss << "║ SIMD TEST SUMMARY ║\n";
64 ss << "╚════════════════════════════════════════════════════════════════╝\n";
65 FL_PRINT(ss.str());
66
67 ss.clear();
68 ss << "Total Tests: " << total_tests << "\n";
69 ss << "Passed: " << passed_tests << " ("
70 << (total_tests > 0 ? (passed_tests * 100 / total_tests) : 0) << "%)\n";
71 ss << "Failed: " << failed_tests << " ("
72 << (total_tests > 0 ? (failed_tests * 100 / total_tests) : 0) << "%)";
73 FL_PRINT(ss.str());
74
75 if (failed_tests > 0) {
76 FL_PRINT("\nFailed Tests:");
77 for (size_t i = 0; i < test_results.size(); i++) {
78 if (!test_results[i].passed) {
79 fl::sstream fail_ss;
80 fail_ss << " - " << test_results[i].test_name;
81 if (test_results[i].error_msg) {
82 fail_ss << ": " << test_results[i].error_msg;
83 }
84 FL_PRINT(fail_ss.str());
85 }
86 }
87 }
88}
89
90void print_final_banner(int failed_tests) {
91 fl::sstream ss;

Callers

nothing calls this directly

Calls 3

strMethod · 0.45
clearMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected