Merge branch 'feature/pascaligo-remove-simplify' into 'dev'

Add test for PascaLIGO remove syntax which appears to work

See merge request ligolang/ligo!126
This commit is contained in:
Sander 2019-10-08 19:35:09 +00:00
commit 8dfb2a967f
2 changed files with 8 additions and 0 deletions

View File

@ -13,6 +13,10 @@ function add_op (const s : set(string)) : set(string) is
function remove_op (const s : set(string)) : set(string) is
begin skip end with set_remove("foobar" , s)
// Test the PascaLIGO syntactic sugar for set removal vs. the function call
function remove_syntax (var s : set(string)) : set(string) is
begin remove "foobar" from set s; end with s
function mem_op (const s : set(string)) : bool is
begin skip end with set_mem("foobar" , s)

View File

@ -241,6 +241,10 @@ let set_arithmetic () : unit result =
expect_eq program "remove_op"
(e_set [e_string "foo" ; e_string "bar" ; e_string "foobar"])
(e_set [e_string "foo" ; e_string "bar"]) in
let%bind () =
expect_eq program "remove_syntax"
(e_set [e_string "foo" ; e_string "bar" ; e_string "foobar"])
(e_set [e_string "foo" ; e_string "bar"]) in
let%bind () =
expect_eq program "mem_op"
(e_set [e_string "foo" ; e_string "bar" ; e_string "foobar"])