int checking = raw_random_id();
if (!_keys_in_use.member(checking)) return checking; // got one.
} // keep going until we find unused id.
int checking = raw_random_id();
if (!_keys_in_use.member(checking)) return checking; // got one.
} // keep going until we find unused id.
to_add->snacky_string = string_manipulation::make_random_name();
to_add->food_bar = random_id;
outcome expected = common::IS_NEW;
to_add->snacky_string = string_manipulation::make_random_name();
to_add->food_bar = random_id;
outcome expected = common::IS_NEW;
ASSERT_EQUAL(_the_table.add(random_id, to_add).value(), expected.value(),
"add should give proper outcome based on expectation");
if (_keys_in_use.member(random_id))
ASSERT_EQUAL(_the_table.add(random_id, to_add).value(), expected.value(),
"add should give proper outcome based on expectation");
if (_keys_in_use.member(random_id))
_hits[FIND - FIRST_TEST]++;
int rand_indy = randomizer().inclusive(0, _keys_in_use.elements() - 1);
int find_key = _keys_in_use[rand_indy];
_hits[FIND - FIRST_TEST]++;
int rand_indy = randomizer().inclusive(0, _keys_in_use.elements() - 1);
int find_key = _keys_in_use[rand_indy];
ASSERT_EQUAL(found->food_bar, find_key, "stored key should be same as real key");
ASSERT_TRUE(found->snacky_string.length(), "stored string should have length");
return true;
ASSERT_EQUAL(found->food_bar, find_key, "stored key should be same as real key");
ASSERT_TRUE(found->snacky_string.length(), "stored string should have length");
return true;
int rand_indy = randomizer().inclusive(0, _keys_in_use.elements() - 1);
// this is another key list invariant function, if it works.
int find_key = _keys_in_use[rand_indy];
int rand_indy = randomizer().inclusive(0, _keys_in_use.elements() - 1);
// this is another key list invariant function, if it works.
int find_key = _keys_in_use[rand_indy];
ASSERT_EQUAL(found->food_bar, find_key, "stored key should be equal to real key");
ASSERT_TRUE(found->snacky_string.length(), "stored string should not have zero length");
// zap.
ASSERT_EQUAL(found->food_bar, find_key, "stored key should be equal to real key");
ASSERT_TRUE(found->snacky_string.length(), "stored string should not have zero length");
// zap.