projects
/
p5sagit/p5-mst-13.2.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Add Internals::HvREHASH to expose the rehashing flag
[p5sagit/p5-mst-13.2.git]
/
t
/
op
/
hash.t
1
#!./perl -w
2
3
BEGIN {
4
chdir 't' if -d 't';
5
@INC = '../lib';
6
require './test.pl';
7
}
8
9
use strict;
10
11
plan tests => 3;
12
13
my %h;
14
15
ok (!Internals::HvREHASH(%h), "hash doesn't start with rehash flag on");
16
17
foreach (1..10) {
18
$h{"\0"x$_}++;
19
}
20
21
ok (!Internals::HvREHASH(%h), "10 entries doesn't trigger rehash");
22
23
foreach (11..20) {
24
$h{"\0"x$_}++;
25
}
26
27
ok (Internals::HvREHASH(%h), "20 entries triggers rehash");