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 =
|
||||
-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
|
||||
bind_map_list aux [
|
||||
("neg_op", fun n -> (-n)) ;
|
||||
("neg_op_2", fun n -> -(n + 10)) ;
|
||||
] in
|
||||
ok ()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user