summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-03-18 20:12:47 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-03-18 20:12:47 +0100
commit2e0e16c9a7efc2d1fccff9f29d125f34121cb65d (patch)
tree371ece7ef18955ca63016222d02c6f027bb6b1d6
parent0cfbf1eabaa9be38a1db953e3ec905f70a1605cd (diff)
downloadperl-2e0e16c9a7efc2d1fccff9f29d125f34121cb65d.tar.gz
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.
-rw-r--r--t/op/smartmatch.t34
1 files changed, 17 insertions, 17 deletions
diff --git a/t/op/smartmatch.t b/t/op/smartmatch.t
index a0b4be6666..71e565a3ad 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