count = 0;
HMAPX_FOR_EACH_WITH_HASH (e, node, hash (order[i]), hmapx)
count = 0;
HMAPX_FOR_EACH_WITH_HASH (e, node, hash (order[i]), hmapx)
check_hmapx (&hmapx, insertions, i + 1, hash);
/* A series of insertions should not produce a shrinkable hmapx. */
check_hmapx (&hmapx, insertions, i + 1, hash);
/* A series of insertions should not produce a shrinkable hmapx. */
for (cnt = 0; cnt <= max_elems; cnt++)
{
int *insertions, *deletions;
for (cnt = 0; cnt <= max_elems; cnt++)
{
int *insertions, *deletions;
test_insert_delete (insertions, deletions, cnt, hash, 1);
test_insert_delete (insertions, deletions, cnt, hash, 1);
int i;
values = xnmalloc (cnt, sizeof *values);
for (i = 0; i < cnt; i++)
values[i] = i;
int i;
values = xnmalloc (cnt, sizeof *values);
for (i = 0; i < cnt; i++)
values[i] = i;
- for (permutation_cnt = 0;
- permutation_cnt == 0 || next_permutation (values, cnt);
- permutation_cnt++)
+ for (n_permutations = 0;
+ n_permutations == 0 || next_permutation (values, cnt);
+ n_permutations++)
test_insert_delete (values, values, cnt, hash, cnt / 2);
test_insert_delete (values, values, cnt, hash, cnt / 2);
for (cnt = 0; cnt <= max_elems; cnt++)
{
int *insertions, *deletions;
for (cnt = 0; cnt <= max_elems; cnt++)
{
int *insertions, *deletions;
- for (permutation_cnt = 0;
- permutation_cnt == 0 || next_permutation (insertions, cnt);
- permutation_cnt++)
+ for (n_permutations = 0;
+ n_permutations == 0 || next_permutation (insertions, cnt);
+ n_permutations++)
{
memcpy (deletions, insertions, sizeof *insertions * cnt);
reverse (deletions, cnt);
test_insert_delete (insertions, deletions, cnt, hash, cnt);
}
{
memcpy (deletions, insertions, sizeof *insertions * cnt);
reverse (deletions, cnt);
test_insert_delete (insertions, deletions, cnt, hash, cnt);
}
nodes[i] = hmapx_insert (&hmapx, &elements[i], hash (elements[i].data));
check_hmapx (&hmapx, values, i + 1, hash);
nodes[i] = hmapx_insert (&hmapx, &elements[i], hash (elements[i].data));
check_hmapx (&hmapx, values, i + 1, hash);
int *values, *changed_values;
struct hmapx_node **nodes;
struct element *elements;
int *values, *changed_values;
struct hmapx_node **nodes;
struct element *elements;
- for (permutation_cnt = 0;
- permutation_cnt == 0 || next_permutation (values, cnt);
- permutation_cnt++)
+ for (n_permutations = 0;
+ n_permutations == 0 || next_permutation (values, cnt);
+ n_permutations++)
struct hmapx_node **nodes;
struct element *elements;
struct element replacement;
struct hmapx_node **nodes;
struct element *elements;
struct element replacement;
- for (permutation_cnt = 0;
- permutation_cnt == 0 || next_permutation (values, cnt);
- permutation_cnt++)
+ for (n_permutations = 0;
+ n_permutations == 0 || next_permutation (values, cnt);
+ n_permutations++)