add missing tests

This commit is contained in:
Simon Cruanes 2015-08-25 09:47:57 +02:00
parent 8ad8acc57b
commit 73c84e14cc
3 changed files with 4 additions and 0 deletions

View file

@ -46,4 +46,5 @@ let suite =
"test_push" >:: test_push; "test_push" >:: test_push;
"test_pop" >:: test_pop; "test_pop" >:: test_pop;
"test_fold" >:: test_fold; "test_fold" >:: test_fold;
"test_append" >:: test_append;
] ]

View file

@ -93,5 +93,6 @@ let suite =
"clear" >:: test_clear; "clear" >:: test_clear;
"mem" >:: test_mem; "mem" >:: test_mem;
"bindings" >:: test_bindings; "bindings" >:: test_bindings;
"keys" >:: test_keys;
] ]

View file

@ -92,6 +92,7 @@ let test_filter () =
let test_map () = let test_map () =
let h = PHashtbl.create 5 in let h = PHashtbl.create 5 in
PHashtbl.of_seq h my_seq; PHashtbl.of_seq h my_seq;
OUnit.assert_equal (PHashtbl.length h) 4;
let h' = PHashtbl.map (fun k v -> String.uppercase v) h in let h' = PHashtbl.map (fun k v -> String.uppercase v) h in
OUnit.assert_equal (PHashtbl.length h') 4; OUnit.assert_equal (PHashtbl.length h') 4;
OUnit.assert_equal (PHashtbl.find h' 1) "A"; OUnit.assert_equal (PHashtbl.find h' 1) "A";
@ -109,4 +110,5 @@ let suite =
"test_copy" >:: test_copy; "test_copy" >:: test_copy;
"test_remove" >:: test_remove; "test_remove" >:: test_remove;
"test_filter" >:: test_filter; "test_filter" >:: test_filter;
"test_map" >:: test_map;
] ]