From: Nicholas Clark Date: Wed, 26 Dec 2007 17:02:34 +0000 (+0000) Subject: Better diagnostics by removing an && from an ok() and converting it to X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0707d6cc81b12c5d582707b1575b1be4695dd7fc;p=p5sagit%2Fp5-mst-13.2.git Better diagnostics by removing an && from an ok() and converting it to two is()s. p4raw-id: //depot/perl@32733 --- diff --git a/ext/B/t/deparse.t b/ext/B/t/deparse.t index 8763b4a..7aeb159 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';