Add more complex negative operator test

This commit is contained in:
John David Pressman 2019-10-29 10:07:07 -07:00
parent dce98c06ec
commit f0f4c683f2
2 changed files with 6 additions and 0 deletions

View File

@ -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)

View File

@ -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 ()