diff --git a/src/test/contracts/set_arithmetic.ligo b/src/test/contracts/set_arithmetic.ligo index cd7c1175c..81f9b0d6c 100644 --- a/src/test/contracts/set_arithmetic.ligo +++ b/src/test/contracts/set_arithmetic.ligo @@ -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) diff --git a/src/test/integration_tests.ml b/src/test/integration_tests.ml index a8f67cd2b..e68e32d8f 100644 --- a/src/test/integration_tests.ml +++ b/src/test/integration_tests.ml @@ -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"])