Skip to content

Commit

Permalink
Simplify test
Browse files Browse the repository at this point in the history
  • Loading branch information
7h3kk1d committed Oct 25, 2024
1 parent be06410 commit 6b1c3b0
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions test/Test_Menhir.re
Original file line number Diff line number Diff line change
Expand Up @@ -197,20 +197,16 @@ let tests = [
|> Exp.fresh,
"let (x : Int) = 5 in x",
),
test_case("named_function", `Quick, () => {
alco_check(
"named_function matches expected type",
Fun(
Pat.Var("x") |> Pat.fresh,
BinOp(Int(Plus), Var("x") |> Exp.fresh, Int(5) |> Exp.fresh)
|> Exp.fresh,
None,
Some("f"),
)
menhir_only_test(
"named_function",
Fun(
Pat.Var("x") |> Pat.fresh,
BinOp(Int(Plus), Var("x") |> Exp.fresh, Int(5) |> Exp.fresh)
|> Exp.fresh,
Haz3lmenhir.Conversion.Exp.of_menhir_ast(
Haz3lmenhir.Interface.parse_program("named_fun f x -> x + 5"),
),
None,
Some("f"),
)
}),
|> Exp.fresh,
"named_fun f x -> x + 5",
),
];

0 comments on commit 6b1c3b0

Please sign in to comment.