From df6377392ff2959a614242615a1dda51f5b97176 Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Thu, 13 Sep 2018 08:58:19 -0400 Subject: [PATCH] Indicate "OK" for expected errors --- compiler/src/lib/tiger/tiger_test.ml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/src/lib/tiger/tiger_test.ml b/compiler/src/lib/tiger/tiger_test.ml index 6a9ca10..83e9890 100644 --- a/compiler/src/lib/tiger/tiger_test.ml +++ b/compiler/src/lib/tiger/tiger_test.ml @@ -120,19 +120,19 @@ let run tests = let output_value = None in match f input with | exception e -> - let c, e = + let status_text, error_text = (match e with | Tiger_error.T e when is_error_expected e -> - (Green, Tiger_error.to_string e) + ((color Green "OK"), Tiger_error.to_string e) | Tiger_error.T e -> incr error_count; - (Red, Tiger_error.to_string e) + ((color Red "ERROR"), Tiger_error.to_string e) | e -> incr error_count; - (Red, Printexc.to_string e) + ((color Red "ERROR"), Printexc.to_string e) ) in - ( s "%s: %s" (color c "ERROR") e + ( s "%s: %s" status_text error_text , output_status , output_value ) -- 2.20.1