hmap: New function hmap_is_empty().
[pspp] / tests / libpspp / hmap-test.c
index 3b3369061f704314d7dce339f961bcd4648abaaa..64511b7bbf1d1c7dafb79857fc811b014d6e9af2 100644 (file)
@@ -342,6 +342,7 @@ check_hmap (struct hmap *hmap, const int data[], size_t cnt,
   size_t i, j;
   int *order;
 
+  check (hmap_is_empty (hmap) == (cnt == 0));
   check (hmap_count (hmap) == cnt);
   check (cnt <= hmap_capacity (hmap));