summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-12-26 17:02:34 +0000
committerNicholas Clark <nick@ccl4.org>2007-12-26 17:02:34 +0000
commit0707d6cc81b12c5d582707b1575b1be4695dd7fc (patch)
tree740515ced2a569182a00def71a2515dba50b5c65
parent62ba2c934831b412d226e94c53b2ed4d0a5c0726 (diff)
downloadperl-0707d6cc81b12c5d582707b1575b1be4695dd7fc.tar.gz
Better diagnostics by removing an && from an ok() and converting it to
two is()s. p4raw-id: //depot/perl@32733
-rw-r--r--ext/B/t/deparse.t7
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/B/t/deparse.t b/ext/B/t/deparse.t
index 8763b4a59e..7aeb159b00 100644
--- a/ext/B/t/deparse.t
+++ b/ext/B/t/deparse.t
@@ -27,7 +27,7 @@ BEGIN {
require feature;
feature->import(':5.10');
}
-use Test::More tests => 56;
+use Test::More tests => 57;
use B::Deparse;
my $deparse = B::Deparse->new();
@@ -102,8 +102,9 @@ is("{\n (-1) ** \$a;\n}", $deparse->coderef2text(sub{(-1) ** $a }));
use constant cr => ['hello'];
my $string = "sub " . $deparse->coderef2text(\&cr);
-my $val = (eval $string)->();
-ok( ref($val) eq 'ARRAY' && $val->[0] eq 'hello');
+my $val = (eval $string)->() or diag $string;
+is(ref($val), 'ARRAY');
+is($val->[0], 'hello');
my $Is_VMS = $^O eq 'VMS';
my $Is_MacOS = $^O eq 'MacOS';