projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bcd9ca9
)
Convert two ok()s to better constructions.
author
Nicholas Clark
<nick@ccl4.org>
Thu, 20 Apr 2006 17:37:31 +0000
(17:37 +0000)
committer
Nicholas Clark
<nick@ccl4.org>
Thu, 20 Apr 2006 17:37:31 +0000
(17:37 +0000)
p4raw-id: //depot/perl@27918
lib/base/t/fields.t
patch
|
blob
|
history
diff --git
a/lib/base/t/fields.t
b/lib/base/t/fields.t
index
f36fc82
..
049b29d
100644
(file)
--- a/
lib/base/t/fields.t
+++ b/
lib/base/t/fields.t
@@
-44,7
+44,7
@@
eval q(return; my Foo $obj = Foo->new; $obj->{notthere} = "");
my $error = $Has_PH ? 'No such(?: [\w-]+)? field "notthere"'
: q[No such class field "notthere" in variable $obj ].
q[of type Foo];
-
ok( $@ && $@ =~
/^\Q$error/i );
+
like( $@, qr
/^\Q$error/i );
foreach (Foo->new) {
@@
-58,7
+58,7
@@
foreach (Foo->new) {
@{$obj}{qw(what who _up_yours)} = ('Ahh', 'Moo', 'Yip');
while(my($k,$v) = each %test) {
-
ok($obj->{$k} eq
$v);
+
is($obj->{$k},
$v);
}
}