Lines Matching refs:keys

108     is( keys %hash, 0,  'lock_keys() w/keyset shouldnt add new keys' );
110 is( keys %hash, 1 );
124 is( keys %hash, 3, 'lock_keys() w/keyset didnt add new keys' );
168 is (scalar keys %hash, 0, "place holder isn't a key");
170 is (scalar keys %hash, 1, "we now have a key");
172 is (scalar keys %hash, 0, "now no key");
177 is (scalar keys %hash, 1, "key again");
179 is (scalar keys %hash, 0, "no key again");
183 is (scalar keys %hash, 0, "place holder isn't a key");
193 is (scalar keys %hash, 0, "and therefore there are no keys");
195 is (scalar keys %hash, 1, "we now have just one key");
197 is (scalar keys %hash, 0, "back to zero");
204 is (scalar keys %hash, 2, "two keys, values both undef");
208 is (scalar keys %hash, 2, "still two keys after locking");
223 # bug whereby hash iterators could lose hash keys (and values, as the code
226 my @keys = qw(small medium large);
230 # Try setting all combinations of the 3 keys
234 push @usekeys, $keys[$bits] if $usekeys & (1 << $bits);
238 lock_keys ( %target, @keys ) if $lock;
245 = ($lock ? 'locked' : 'not locked') . ' keys ' . join ',', @usekeys;
247 is (scalar keys %target, scalar keys %clean, "scalar keys for $message");
252 # colliding on the same bucket, so the iterator order (output of keys,
254 # the keys of the hash involves behind the scenes key additions.
255 is_deeply( [sort keys %target] , [sort keys %clean],
256 "list keys for $message");
282 ok(keys(%hash) == 0, 'clear empty lock_hash() hash');
288 ok(keys(%hash) == 0, 'clear empty lock_keys() hash');