More tests with lambdas
This commit is contained in:
parent
606f7ca907
commit
0e5c9802ec
@ -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
|
||||
|
7
src/contracts/fibo2.mligo
Normal file
7
src/contracts/fibo2.mligo
Normal 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
|
7
src/contracts/fibo3.mligo
Normal file
7
src/contracts/fibo3.mligo
Normal 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
|
6
src/contracts/fibo4.mligo
Normal file
6
src/contracts/fibo4.mligo
Normal 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
|
@ -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 ;
|
||||
|
Loading…
Reference in New Issue
Block a user