Add let-in multi bind test

This commit is contained in:
John David Pressman 2019-12-24 13:48:14 -08:00
parent d6398d7e8b
commit 7454e8b01f
2 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1,2 @@
let sum (p: int * int) : int =
let i, result = p in i + result

View File

@ -1795,6 +1795,11 @@ let type_tuple_destruct () : unit result =
let%bind () = expect_eq program "type_tuple_d_2" (e_unit ()) (e_string "helloworld") in let%bind () = expect_eq program "type_tuple_d_2" (e_unit ()) (e_string "helloworld") in
ok () ok ()
let let_in_multi_bind () : unit result =
let%bind program = mtype_file "./contracts/let_in_multi_bind.mligo" in
let%bind () = expect_eq program "sum" (e_tuple [e_int 10; e_int 10]) (e_int 20)
in ok ()
let main = test_suite "Integration (End to End)" [ let main = test_suite "Integration (End to End)" [
test "key hash" key_hash ; test "key hash" key_hash ;
test "chain id" chain_id ; test "chain id" chain_id ;
@ -1933,4 +1938,5 @@ let main = test_suite "Integration (End to End)" [
test "deep_access (ligo)" deep_access_ligo; test "deep_access (ligo)" deep_access_ligo;
test "entrypoints (ligo)" entrypoints_ligo ; test "entrypoints (ligo)" entrypoints_ligo ;
test "type tuple destruct (mligo)" type_tuple_destruct ; test "type tuple destruct (mligo)" type_tuple_destruct ;
test "let in multi-bind (mligo)" let_in_multi_bind ;
] ]