Format driver validation results as a summary table.
13 {
15 ss << "\n╔════════════════════════════════════════════════════════════════╗\n";
16 ss << "║ DRIVER VALIDATION SUMMARY ║\n";
17 ss << "╠════════════════════════════════════════════════════════════════╣\n";
18 ss << "║ Driver │ Status │ Tests Passed │ Total Tests ║\n";
19 ss << "╠══════════════╪═════════════╪══════════════╪═══════════════════╣\n";
20
21 for (fl::size i = 0; i < driver_results.
size(); i++) {
22 const auto&
result = driver_results[i];
23 const char* status;
25 status = "SKIPPED ";
26 }
else if (
result.allPassed()) {
27 status = "PASS ✓ ";
28 }
else if (
result.anyFailed()) {
29 status = "FAIL ✗ ";
30 } else {
31 status = "NO TESTS ";
32 }
33
34
35 ss << "║ ";
36
37
38 fl::string driver_name =
result.driver_name;
39 if (driver_name.
length() > 12) {
40 driver_name = driver_name.
substr(0, 12);
41 }
42 ss << driver_name;
43 for (size_t j = driver_name.length(); j < 12; j++) {
44 ss << " ";
45 }
46 ss << " │ " << status << " │ ";
47
48
50 ss << "-";
51 for (int j = 1; j < 12; j++) ss << " ";
52 } else {
54 ss << passed;
55 for (
size_t j = passed.
length(); j < 12; j++) ss <<
" ";
56 }
57 ss << " │ ";
58
59
61 ss << "-";
62 for (int j = 1; j < 17; j++) ss << " ";
63 } else {
65 ss << total;
66 for (
size_t j = total.
length(); j < 17; j++) ss <<
" ";
67 }
68 ss << " ║\n";
69 }
70
71 ss << "╚══════════════╧═════════════╧══════════════╧═══════════════════╝";
73}
fl::size length() const FL_NOEXCEPT
string str() const FL_NOEXCEPT
string substr(fl::size start, fl::size length) const FL_NOEXCEPT
fl::size size() const FL_NOEXCEPT
string to_string(T value) FL_NOEXCEPT
expected< T, E > result
Alias for expected (Rust-style naming)