| 56 | // ============================================================================ |
| 57 | |
| 58 | void 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 | |
| 90 | void print_final_banner(int failed_tests) { |
| 91 | fl::sstream ss; |