Add test for set patch functionality
Resolves LIGO-127
This commit is contained in:
parent
2f60c85aa8
commit
c82076281f
@ -17,6 +17,11 @@ function remove_op (const s : set(string)) : set(string) is
|
||||
function remove_syntax (var s : set(string)) : set(string) is
|
||||
begin remove "foobar" from set s; end with s
|
||||
|
||||
function patch_op (var s: set(string)) : set(string) is
|
||||
begin patch s with set ["foobar"]; end with s
|
||||
|
||||
function mem_op (const s : set(string)) : bool is
|
||||
begin skip end with set_mem("foobar" , s)
|
||||
|
||||
|
||||
|
||||
|
@ -245,6 +245,10 @@ let set_arithmetic () : unit result =
|
||||
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 "patch_op"
|
||||
(e_set [e_string "foo" ; e_string "bar"])
|
||||
(e_set [e_string "foo" ; e_string "bar"; e_string "foobar"]) 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