X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=compiler%2Fsrc%2Flib%2Ftiger%2Ftiger_test.ml;h=4d3287d88680a33223fb718ebf052e61ff92c117;hb=35dccbd3999a8c3bb1dc9e96e21b69a39f44fc6f;hp=fe84ef8bc215ad04e8b7826b52e0f0cc07cf67f8;hpb=8e47ed20c781e65940089e6f71e9a8ac6ea27d73;p=tiger.ml.git diff --git a/compiler/src/lib/tiger/tiger_test.ml b/compiler/src/lib/tiger/tiger_test.ml index fe84ef8..4d3287d 100644 --- a/compiler/src/lib/tiger/tiger_test.ml +++ b/compiler/src/lib/tiger/tiger_test.ml @@ -28,18 +28,7 @@ open Printf module List = ListLabels module String = StringLabels -module Option : sig - type 'a t = 'a option - - val map : 'a t -> ('a -> 'b) -> 'b t -end = struct - type 'a t = 'a option - - let map t f = - match t with - | None -> None - | Some x -> Some (f x) -end +module Opt = Tiger_opt (* TODO: ~expect:Output of 'a | Exception of (exn -> bool) *) type t = @@ -214,7 +203,7 @@ let run tests = | Ok produced -> let (out_stat, out_msg) = match - Option.map expect_output (fun expected -> expected = produced) + Opt.map expect_output (fun expected -> expected = produced) with | None -> (Skip, "expected output not provided") @@ -233,7 +222,7 @@ let run tests = } in let test_case_count = ref 0 in - let col_1_width = 25 in + let col_1_width = 30 in let p_stat width (exe, out) = (* All this gymnastics to ignore color codes in cell width *) let min = 5 in