More tests with lambdas

This commit is contained in:
Georges Dupéron 2019-06-12 00:50:48 +02:00 committed by Suzanne Dupéron
parent 606f7ca907
commit 0e5c9802ec
5 changed files with 24 additions and 5 deletions

View File

@ -1,12 +1,8 @@
type storage = unit
(* not supported yet
let%entry main (p:unit) storage =
(fun x -> ()) ()
*)
let%entry main (p:unit) storage =
(fun (f : int -> int -> int) (x : int) (y : int) -> f y (x + y))
(fun (f : (int * int) -> int) (x : int) (y : int) -> f (y, x))
(fun (x : int) (y : int) -> x + y)
0
1

View File

@ -0,0 +1,7 @@
type storage = unit
let%entry main (p:unit) storage =
(fun (f : int -> int) (x : int) (y : int) -> (f y))
(fun (x : int) -> x)
0
1

View File

@ -0,0 +1,7 @@
type storage = unit
let%entry main (p:unit) storage =
(fun (f : int -> int -> int) (x : int) (y : int) -> (f y) (x + y))
(fun (x : int) (y : int) -> x + y)
0
1

View File

@ -0,0 +1,6 @@
type storage = unit
let%entry main (p:unit) storage =
(fun (f : int -> int) (x : int) -> (f x))
(fun (x : int) -> x)
1

View File

@ -918,6 +918,9 @@ let main = test_suite "Integration (End to End)" [
test "tez (mligo)" tez_mligo ;
test "lambda2 mligo" lambda2_mligo ;
(* test "fibo (mligo)" fibo_mligo ; *)
(* test "fibo2 (mligo)" fibo2_mligo ; *)
(* test "fibo3 (mligo)" fibo3_mligo ; *)
(* test "fibo4 (mligo)" fibo4_mligo ; *)
test "website1 ligo" website1_ligo ;
test "website2 ligo" website2_ligo ;
test "website2 (mligo)" website2_mligo ;