Commits

Markus Mottl committed 27ad409

Fixed bin_prot test suite bug related to new Hashtbl implementation in OCaml 4.0

Comments (0)

Files changed (1)

base/bin_prot/lib_test/bin_prot_test.ml

 
         "hashtbl" >::
           (fun () ->
-            let htbl = Hashtbl.create 0 in
             let bindings = List.rev [(42, 3.); (17, 2.); (42, 4.)] in
+            let htbl = Hashtbl.create (List.length bindings) in
             List.iter (fun (k, v) -> Hashtbl.add htbl k v) bindings;
             check_all 28 "hashtbl"
               (Read.bin_read_hashtbl Read.bin_read_int Read.bin_read_float)
               (Write.bin_write_hashtbl Write.bin_write_int Write.bin_write_float)
               [
-                (htbl, "[(42, 3.); (17, 2.); (42., 4.)]", 28);
+                (htbl, "[(42, 3.); (17, 2.); (42, 4.)]", 28);
                 (Hashtbl.create 0, "[]", 1)
               ];
           );