+ let col_1_width = 25 in
+ let col_i_width = 10 in
+ let p_stat width (exe, out) =
+ (* All this gymnastics to ignore color codes in cell width *)
+ let min = 5 in
+ let width = if width > min then width else min in
+ p "%s" (String.concat "" (List.init ~len:width ~f:(function
+ | 0 -> " "
+ | 1 -> bar_vert
+ | 2 -> " "
+ | 3 -> colorize (status_to_str exe) (status_to_color exe)
+ | 4 -> colorize (status_to_str out) (status_to_color out)
+ | _ -> " "
+ )))
+
+ in
+ p "%s" bar_horiz_major; p_ln ();
+ p "%s" (str_exact "Test case" col_1_width);
+ List.iter ~f:(fun header -> p " %s %s" bar_vert header)
+ [ "Lexing"
+ ; "Parsing"
+ ; "Semant"
+ ];
+ p_ln ();
+ p "%s" bar_horiz_major; p_ln ();