From c0b10ff1a1cf0abcc1cd2f7e5aa255f1edc620c9 Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Sun, 16 Sep 2018 19:27:56 -0400 Subject: [PATCH] Expect type error in test43.tig --- compiler/src/lib/tiger/tiger_test_cases_book.ml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/compiler/src/lib/tiger/tiger_test_cases_book.ml b/compiler/src/lib/tiger/tiger_test_cases_book.ml index 25e004d..3cad92b 100644 --- a/compiler/src/lib/tiger/tiger_test_cases_book.ml +++ b/compiler/src/lib/tiger/tiger_test_cases_book.ml @@ -1,5 +1,6 @@ module List = ListLabels +module Error = Tiger_error module Test = Tiger_test let read_file filepath = @@ -90,9 +91,15 @@ let is_error_expected_parsing_of_filename = (* TODO: Fill-in other expected cases *) None -let is_error_expected_semant_of_filename _ = - (* TODO: Fill-in expected cases *) - None +let is_error_expected_semant_of_filename = + let module E = Tiger_error in + function + | "test43.tig" -> + Some Error.is_wrong_type + (* TODO: Be more specific - what expected, what given? *) + | _ -> + (* TODO: Fill-in other expected cases *) + None let test_case_of_filename filename ~dir = Test.case -- 2.20.1