From: Rafael Garcia-Suarez Date: Wed, 18 Mar 2009 19:12:47 +0000 (+0100) Subject: Reverse the order of operands for several "~~ hash" tests X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2e0e16c9a7efc2d1fccff9f29d125f34121cb65d;p=p5sagit%2Fp5-mst-13.2.git Reverse the order of operands for several "~~ hash" tests This way the hash is on the right. Some of those tests will need to become symmetrical later. --- diff --git a/t/op/smartmatch.t b/t/op/smartmatch.t index a0b4be6..71e565a 100644 --- a/t/op/smartmatch.t +++ b/t/op/smartmatch.t @@ -243,23 +243,23 @@ __DATA__ \%tied_hash \%tied_hash # - an array ref - \%:: [keys %main::] -! \%:: [] - {"" => 1} [undef] - { foo => 1 } ["foo"] - { foo => 1 } ["foo", "bar"] - \%hash ["foo", "bar"] - \%hash ["foo"] -! \%hash ["quux"] - \%hash [qw(foo quux)] + [keys %main::] \%:: +! [] \%:: + [undef] {"" => 1} + ["foo"] { foo => 1 } + ["foo", "bar"] { foo => 1 } + ["foo", "bar"] \%hash + ["foo"] \%hash +! ["quux"] \%hash + [qw(foo quux)] \%hash # - a regex - {foo => 1} qr/^(fo[ox])$/ -! +{0..99} qr/[13579]$/ + qr/^(fo[ox])$/ {foo => 1} +! qr/[13579]$/ +{0..99} # - a string - +{foo => 1, bar => 2} "foo" -! +{foo => 1, bar => 2} "baz" + "foo" +{foo => 1, bar => 2} +! "baz" +{foo => 1, bar => 2} # ARRAY ref against: @@ -316,10 +316,10 @@ __DATA__ @nums [1..10] ! @nums [0..9] - %hash "foo" - %hash /bar/ - %hash [qw(bar)] -! %hash [qw(a b c)] + "foo" %hash + /bar/ %hash + [qw(bar)] %hash +! [qw(a b c)] %hash %hash %hash %hash +{%hash} %hash \%hash