+33
test/test_validator.ml
+33
test/test_validator.ml
···
302
302
Printf.printf "Running tests...\n%!";
303
303
let results = List.map (run_test messages) tests in
304
304
305
+
(* Print failing isvalid tests *)
306
+
let failing_isvalid = List.filter (fun r ->
307
+
r.file.expected = Valid && not r.passed
308
+
) results in
309
+
if failing_isvalid <> [] then begin
310
+
Printf.printf "\n=== Failing isvalid tests ===\n";
311
+
List.iter (fun r ->
312
+
Printf.printf "%s: %s\n" r.file.relative_path r.details
313
+
) failing_isvalid
314
+
end;
315
+
316
+
(* Print failing haswarn tests *)
317
+
let failing_haswarn = List.filter (fun r ->
318
+
r.file.expected = HasWarning && not r.passed
319
+
) results in
320
+
if failing_haswarn <> [] then begin
321
+
Printf.printf "\n=== Failing haswarn tests ===\n";
322
+
List.iter (fun r ->
323
+
Printf.printf "%s\n" r.file.relative_path
324
+
) failing_haswarn
325
+
end;
326
+
327
+
(* Print failing novalid tests *)
328
+
let failing_novalid = List.filter (fun r ->
329
+
r.file.expected = Invalid && not r.passed
330
+
) results in
331
+
if failing_novalid <> [] then begin
332
+
Printf.printf "\n=== Failing novalid tests (first 50) ===\n";
333
+
List.iteri (fun i r ->
334
+
if i < 50 then Printf.printf "%s\n" r.file.relative_path
335
+
) failing_novalid
336
+
end;
337
+
305
338
print_summary results;
306
339
generate_html_report results report_path;
307
340