X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=compiler%2Fsrc%2Flib%2Ftiger%2Ftiger_test.ml;h=fdab310e23eb122cf1b91246cb272fba9ad83678;hb=0f031bf216b72b6d6bbc3941f4244c898f134ce4;hp=89376a38ad4044cd1676d93845acd2643176fc3e;hpb=b762cacb0f9df0b034bb75e67c4b64151e338e92;p=tiger.ml.git diff --git a/compiler/src/lib/tiger/tiger_test.ml b/compiler/src/lib/tiger/tiger_test.ml index 89376a3..fdab310 100644 --- a/compiler/src/lib/tiger/tiger_test.ml +++ b/compiler/src/lib/tiger/tiger_test.ml @@ -180,6 +180,7 @@ let run tests = let output_value = Some produced in (execution_status, output_status, output_value) in + let test_case_count = ref 0 in List.iter tests ~f:( fun { name @@ -189,6 +190,7 @@ let run tests = ; is_error_expected_semant } -> + incr test_case_count; let (stat_lex_exe, stat_lex_out_cmp, _) = run_pass ~f:pass_lexing @@ -224,9 +226,12 @@ let run tests = ); p "%s" bar_end; p_ln (); p "%s" - (match !failure_count with - | 0 -> status_pass () - | _ -> status_fail () ~info:(s "%d failures" !failure_count) + ( let info = + s "%d failures in %d test cases" !failure_count !test_case_count + in + match !failure_count with + | 0 -> status_pass () ~info + | _ -> status_fail () ~info ); p_ln (); p "%s" bar_end; p_ln ();