Added tests for Map.of_alist_multi

This commit is contained in:
Jeremie Dimino 2017-03-31 13:50:36 +01:00
parent 21b29b0cb6
commit 047139a2d7
2 changed files with 27 additions and 0 deletions

View File

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

View File

@ -22,3 +22,10 @@
(glob_files ${ROOT}/src/*.cmi)
(glob_files ${ROOT}/vendor/re/*.cmi)))
(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} ${<})))))