Skip to content

Commit 1946b9c

Browse files
committed
[minor] make test_untypeast.ml more readable
1 parent 7264dc4 commit 1946b9c

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

testsuite/tests/compiler-libs/test_untypeast.ml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,18 @@ let run s =
88
let pe = Parse.expression (Lexing.from_string s) in
99
let te = Typecore.type_expression Env.initial pe in
1010
let ute = Untypeast.untype_expression te in
11-
Format.asprintf "%a" Pprintast.expression ute
11+
Format.printf "%a@." Pprintast.expression ute
1212
;;
1313

1414
[%%expect{|
15-
val run : string -> string = <fun>
15+
val run : string -> unit = <fun>
1616
|}];;
1717

1818
run {| match None with Some (Some _) -> () | _ -> () |};;
1919

2020
[%%expect{|
21-
- : string = "match None with | Some (Some _) -> () | _ -> ()"
21+
match None with | Some (Some _) -> () | _ -> ()
22+
- : unit = ()
2223
|}];;
2324

2425
(***********************************)
@@ -28,12 +29,14 @@ run {| match None with Some (Some _) -> () | _ -> () |};;
2829
run {| fun x y z -> function w -> x y z w |};;
2930

3031
[%%expect{|
31-
- : string = "fun x y z -> function | w -> x y z w"
32+
fun x y z -> function | w -> x y z w
33+
- : unit = ()
3234
|}];;
3335

3436
(* 3-ary function returning a 1-ary function *)
3537
run {| fun x y z -> (function w -> x y z w) |};;
3638

3739
[%%expect{|
38-
- : string = "fun x y z -> (function | w -> x y z w)"
40+
fun x y z -> (function | w -> x y z w)
41+
- : unit = ()
3942
|}];;

0 commit comments

Comments
 (0)