Add more complex negative operator test
This commit is contained in:
parent
dce98c06ec
commit
f0f4c683f2
@ -3,4 +3,9 @@
|
|||||||
let neg_op (n : int) : int =
|
let neg_op (n : int) : int =
|
||||||
-n
|
-n
|
||||||
|
|
||||||
|
let foo (n : int) : int = n + 10
|
||||||
|
|
||||||
|
let neg_op_2 (b: int) : int = -(foo b)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -184,6 +184,7 @@ let arithmetic_mligo () : unit result =
|
|||||||
let aux (name , f) = expect_eq_n_int program name f in
|
let aux (name , f) = expect_eq_n_int program name f in
|
||||||
bind_map_list aux [
|
bind_map_list aux [
|
||||||
("neg_op", fun n -> (-n)) ;
|
("neg_op", fun n -> (-n)) ;
|
||||||
|
("neg_op_2", fun n -> -(n + 10)) ;
|
||||||
] in
|
] in
|
||||||
ok ()
|
ok ()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user