diff options
author | David Mitchell <davem@iabyn.com> | 2017-07-25 15:10:53 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2017-07-27 11:30:25 +0100 |
commit | cd5acddbd85c06fdc2c3069243a4796b290e5742 (patch) | |
tree | 68287c1d7bb945645f5f6b47f4839ab368ee7150 /t/perf | |
parent | 6f2dc9a6b978e866e22c46235932d018da8262ba (diff) | |
download | perl-cd5acddbd85c06fdc2c3069243a4796b290e5742.tar.gz |
t/perf/benchmarks: rename some keys() entries
move and rename
expr::hash::bool_empty_keys
expr::hash::bool_full_keys
to
func::keys::lex::bool_cxt_empty
func::keys::lex::bool_cxt
and add
func::keys::pkg::bool_cxt_empty
func::keys::pkg::bool_cxt
since its really testing the keys() function in boolean context rather
than a hash in boolean context.
Diffstat (limited to 't/perf')
-rw-r--r-- | t/perf/benchmarks | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/t/perf/benchmarks b/t/perf/benchmarks index 08063b6e3d..61909b08a9 100644 --- a/t/perf/benchmarks +++ b/t/perf/benchmarks @@ -346,11 +346,6 @@ setup => 'my %h;', code => '!%h', }, - 'expr::hash::bool_empty_keys' => { - desc => 'empty lexical hash in boolean keys context', - setup => 'my %h;', - code => '!keys %h', - }, 'expr::hash::bool_empty_unknown' => { desc => 'empty lexical hash in unknown context', setup => 'my ($i, %h); sub f { if (%h) { $i++ }}', @@ -361,11 +356,6 @@ setup => 'my %h = 1..10;', code => '!%h', }, - 'expr::hash::bool_full_keys' => { - desc => 'non-empty lexical hash in keys boolean context', - setup => 'my %h = 1..10;', - code => '!keys %h', - }, ( @@ -1268,6 +1258,16 @@ setup => 'my %h = qw(aardvark 1 banana 2 cucumber 3)', code => 'keys %h', }, + 'func::keys::lex::bool_cxt_empty' => { + desc => ' keys() on an empty lexical hash in bool context', + setup => 'my %h = ()', + code => '!keys %h', + }, + 'func::keys::lex::bool_cxt' => { + desc => ' keys() on a non-empty lexical hash in bool context', + setup => 'my %h = qw(aardvark 1 banana 2 cucumber 3)', + code => '!keys %h', + }, 'func::keys::lex::scalar_cxt_empty' => { desc => ' keys() on an empty lexical hash in scalar context', setup => 'my $k; my %h = ()', @@ -1299,6 +1299,16 @@ setup => 'our %h = qw(aardvark 1 banana 2 cucumber 3)', code => 'keys %h', }, + 'func::keys::pkg::bool_cxt_empty' => { + desc => ' keys() on an empty package hash in bool context', + setup => 'our %h = ()', + code => '!keys %h', + }, + 'func::keys::pkg::bool_cxt' => { + desc => ' keys() on a non-empty package hash in bool context', + setup => 'our %h = qw(aardvark 1 banana 2 cucumber 3)', + code => '!keys %h', + }, 'func::keys::pkg::scalar_cxt_empty' => { desc => ' keys() on an empty package hash in scalar context', setup => 'my $k; our %h = ()', |