Added tests for Map.of_alist_multi
This commit is contained in:
parent
21b29b0cb6
commit
047139a2d7
|
@ -0,0 +1,20 @@
|
||||||
|
(* -*- tuareg -*- *)
|
||||||
|
|
||||||
|
#warnings "-40";;
|
||||||
|
|
||||||
|
open Jbuilder;;
|
||||||
|
open Import;;
|
||||||
|
|
||||||
|
(* Check that [of_alist_multi] groups elements in the right order *)
|
||||||
|
String_map.of_alist_multi
|
||||||
|
[ "a", 1
|
||||||
|
; "b", 1
|
||||||
|
; "a", 2
|
||||||
|
; "a", 3
|
||||||
|
; "b", 2
|
||||||
|
]
|
||||||
|
|> String_map.bindings;;
|
||||||
|
[%%expect{|
|
||||||
|
- : (Jbuilder.Import.String_map.key * int list) list =
|
||||||
|
[("a", [1; 2; 3]); ("b", [1; 2])]
|
||||||
|
|}]
|
|
@ -22,3 +22,10 @@
|
||||||
(glob_files ${ROOT}/src/*.cmi)
|
(glob_files ${ROOT}/src/*.cmi)
|
||||||
(glob_files ${ROOT}/vendor/re/*.cmi)))
|
(glob_files ${ROOT}/vendor/re/*.cmi)))
|
||||||
(action (chdir ${ROOT} (run ${exe:expect_test.bc} ${<})))))
|
(action (chdir ${ROOT} (run ${exe:expect_test.bc} ${<})))))
|
||||||
|
|
||||||
|
(alias
|
||||||
|
((name runtest)
|
||||||
|
(deps (import_dot_map.mlt
|
||||||
|
(glob_files ${ROOT}/src/*.cmi)
|
||||||
|
(glob_files ${ROOT}/vendor/re/*.cmi)))
|
||||||
|
(action (chdir ${ROOT} (run ${exe:expect_test.bc} ${<})))))
|
||||||
|
|
Loading…
Reference in New Issue