- /* Fill it, it should increase in size (once). */
- add_vals(ht, val, NUM_VALS);
- ok1(ht->bits == HTABLE_BASE_BITS + 1);
- ok1(ht->max < (1 << ht->bits));
+ /* This should increase it once. */
+ add_vals(ht, val, 0, 1);
+ ok1(ht->bits == 1);
+ ok1(ht->max == 1);
+ ok1(ht->common_mask == -1);
+
+ /* Mask should be set. */
+ ok1(check_mask(ht, val, 1));
+
+ /* This should increase it again. */
+ add_vals(ht, val, 1, 1);
+ ok1(ht->bits == 2);
+ ok1(ht->max == 3);