File tree Expand file tree Collapse file tree 3 files changed +11
-12
lines changed
Expand file tree Collapse file tree 3 files changed +11
-12
lines changed Original file line number Diff line number Diff line change 1+ module StringDiff =
2+ struct
3+ type t = string
4+ let compare = String. compare
5+ let pp_printer = Format. pp_print_string
6+ let pp_print_sep = OUnitDiff. pp_comma_separator
7+ end
8+
9+ module StringSet = OUnitDiff. SetMake (StringDiff )
Original file line number Diff line number Diff line change @@ -4,16 +4,7 @@ open Fun
44open OUnit
55open Network_utils
66
7- (* Example of using OUnitDiff with a String Set *)
8- module StringDiff =
9- struct
10- type t = string
11- let compare = String. compare
12- let pp_printer = Format. pp_print_string
13- let pp_print_sep = OUnitDiff. pp_comma_separator
14- end
15-
16- module OSSet = OUnitDiff. SetMake (StringDiff )
7+ module OSSet = Ounit_comparators. StringSet
178
189let run_bond_prop_test props c_props c_per_iface =
1910 let props, per_iface_props =
Original file line number Diff line number Diff line change @@ -153,8 +153,7 @@ let test_get_nbd_info =
153153 ; " nbd://[10e1:bdb8:05a3:0002:03ae:8a24:0371:0003]:10809/" ^ uuid ^ " ?session_id=" ^ session_id
154154 ]
155155 in
156- let sort = List. sort String. compare in
157- OUnit. assert_equal ~printer: (String. concat " , " ) (sort expected) (sort nbd_info)
156+ Ounit_comparators.StringSet. (assert_equal (of_list expected) (of_list nbd_info))
158157 in
159158
160159 let test_returns_empty_list_when_no_host_is_connected_to_sr () =
You can’t perform that action at this time.
0 commit comments