Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use 'is' instead of 'ok' when appropriate.
  • Loading branch information
davorg committed May 18, 2016
1 parent 540c6c1 commit d3fb953
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions t/test.t
Expand Up @@ -10,16 +10,16 @@ $hash{stuff} = 'something else';

my $x = 'f';

ok($hash{key} eq 'value');
ok($hash{'^s'} eq 'something else');
ok($hash{qr'^s'} eq 'something else');
is($hash{key}, 'value');
is($hash{'^s'}, 'something else');
is($hash{qr'^s'}, 'something else');
ok(not defined $hash{blah});
ok($hash{$x} eq 'something else');
is($hash{$x}, 'something else');

my @vals = tied(%hash)->FETCH('k');
ok(@vals == 2);
is(@vals, 2);
delete $hash{stuff};
ok(keys %hash == 2);
is(keys %hash, 2);

ok(exists $hash{key});
ok(exists $hash{k});
Expand All @@ -28,7 +28,7 @@ ok(not exists $hash{zz});

delete $hash{2};
my @k = keys %hash;
ok(@k == 1);
is(@k, 1);
delete $hash{qr/^k/};
ok(not keys %hash);

0 comments on commit d3fb953

Please sign in to comment.