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