Skip to content

Commit

Permalink
small cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
benbellick committed Dec 19, 2024
1 parent 7301b32 commit d17cd1e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions test/test_identity.ml
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,24 @@ module Expression = struct
open OnJson

let id = make_id t_encoder t_decoder
let%test "expr_inv:json:1" = check id {|{"Int":15}|}
let%test "expr_inv:json:2" = check id {|{"Add":[{"Int":12},{"Int":15}]}|}
let check = check id
let%test "expr_inv:json:1" = check {|{"Int":15}|}
let%test "expr_inv:json:2" = check {|{"Add":[{"Int":12},{"Int":15}]}|}

let%test "expr_inv:json:3" =
check id
check
{|{"Mul":[{"Sub":[{"Real":-12043.1235},{"Int":4932}]},{"Div":[{"Int":-123},{"Real":5932.1239}]}]}|}
end

module OnValue = struct
open OnValue

let id = make_id t_encoder t_decoder
let%test "expr_inv:value:1" = check id (Int 10)
let check = check id
let%test "expr_inv:value:1" = check (Int 10)

let%test "expr_inv:value:2" =
check id
check
(Add
( Add (Int 10, Int (-5)),
Div (Real 1.4929, Sub (Real (-5392.1239230), Int 58292349823)) ))
Expand Down

0 comments on commit d17cd1e

Please sign in to comment.