Add test for PascaLIGO remove syntax which appears to work
This commit is contained in:
parent
7cf75c54c8
commit
88de350264
@ -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)
|
||||
|
||||
|
@ -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"])
|
||||
|
Loading…
Reference in New Issue
Block a user