Skip to content

Commit 170c2c3

Browse files
committed
Fix model tests
1 parent f5b33fd commit 170c2c3

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

test/unit/test_model.ml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
open OUnit2
22
open Smtml
33

4+
let assert_equal =
5+
let pp_diff fmt (expected, real) =
6+
Fmt.pf fmt "Expected: %[email protected]: %s@." expected real
7+
in
8+
assert_equal ~cmp:String.equal ~pp_diff
9+
410
let test_to_json _ =
511
let x = Symbol.make Ty_int "x" in
612
let y = Symbol.make Ty_real "y" in
@@ -9,10 +15,10 @@ let test_to_json _ =
915
let expected =
1016
{|{
1117
"model": {
18+
"x": { "ty": "int", "value": 1 },
1219
"u": { "ty": "str", "value": "abc" },
13-
"z": { "ty": "bool", "value": true },
1420
"y": { "ty": "real", "value": 2.0 },
15-
"x": { "ty": "int", "value": 1 }
21+
"z": { "ty": "bool", "value": true }
1622
}
1723
}|}
1824
in

0 commit comments

Comments
 (0)