dune/test/unit-tests/import_dot_map.mlt

20 lines
326 B
Plaintext
Raw Normal View History

2017-03-31 12:50:36 +00:00
(* -*- tuareg -*- *)
#warnings "-40";;
open Dune;;
2017-03-31 12:50:36 +00:00
open Import;;
(* Check that [of_alist_multi] groups elements in the right order *)
2018-04-23 05:43:20 +00:00
String.Map.of_list_multi
2017-03-31 12:50:36 +00:00
[ "a", 1
; "b", 1
; "a", 2
; "a", 3
; "b", 2
]
2018-04-23 05:43:20 +00:00
|> String.Map.to_list;;
2017-03-31 12:50:36 +00:00
[%%expect{|
- : (string * int list) list = [("a", [1; 2; 3]); ("b", [1; 2])]
2017-03-31 12:50:36 +00:00
|}]