Add failing test
This commit is contained in:
parent
c5361c57d4
commit
b64f82dff7
@ -20,6 +20,9 @@ function remove_syntax (var s : set(string)) : set(string) is
|
||||
function patch_op (var s: set(string)) : set(string) is
|
||||
begin patch s with set ["foobar"]; end with s
|
||||
|
||||
function patch_op_deep (var s: set(string)*nat) : set(string)*nat is
|
||||
begin patch s.0 with set ["foobar"]; end with s
|
||||
|
||||
function patch_op_empty (var s: set(string)) : set(string) is
|
||||
begin patch s with set []; end with s
|
||||
|
||||
|
@ -249,6 +249,14 @@ let set_arithmetic () : unit result =
|
||||
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 "patch_op_deep"
|
||||
(e_pair
|
||||
(e_set [e_string "foo" ; e_string "bar"])
|
||||
(e_nat 42))
|
||||
(e_pair
|
||||
(e_set [e_string "foo" ; e_string "bar" ; e_string "foobar"])
|
||||
(e_nat 42)) in
|
||||
let%bind () =
|
||||
expect_eq program "patch_op_empty"
|
||||
(e_set [e_string "foo" ; e_string "bar"])
|
||||
|
Loading…
Reference in New Issue
Block a user