Skip to content

Commit

Permalink
fix(parser-tests): fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ksenmel committed Nov 17, 2024
1 parent 773b2b7 commit fb92dfb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/tests/dune
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
(name tests)
(modules test_parser)
(libraries parser ast)
(inline_tests)
(preprocess
(pps ppx_expect ppx_deriving.show)))
(pps ppx_expect ppx_deriving.show))
(inline_tests))
7 changes: 6 additions & 1 deletion lib/tests/test_parser.ml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,9 @@ let run code =
;;

let%expect_test "simple annotation" =
run "let (x : int) = 3" ;
run "let (x : int) = 3";
[%expect {|
[(SDeclaration
(DOrdinary
((PTyped ((PVar (Id "x")), (TDGround TDInt))), (EConstant (CInt 3)))))
] |}]

0 comments on commit fb92dfb

Please sign in to comment.