From: Michael G. Schwern Date: Fri, 2 Nov 2001 15:36:41 +0000 (-0500) Subject: _expect and other little tweaks X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1577bb166a95354d8198faf9da46ef504c9ebfd7;p=p5sagit%2Fp5-mst-13.2.git _expect and other little tweaks Message-ID: <20011102153641.E23234@blackrider> p4raw-id: //depot/perl@12817 --- diff --git a/t/test.pl b/t/test.pl index 029d80f..46d0656 100644 --- a/t/test.pl +++ b/t/test.pl @@ -46,6 +46,8 @@ sub _ok { print "# Failed $where\n"; } $test++; + + return $pass; } sub _where { @@ -58,15 +60,6 @@ sub ok { _ok($pass, _where(), @mess); } -sub _expect { - my ($got, $pass, @mess) = @_; - if ($pass) { - ok(1, @mess); - } else { - ok(0, @mess); - } -} - sub is { my ($got, $expected, @mess) = @_; my $pass = $got eq $expected; @@ -75,7 +68,7 @@ sub is { "# got '$got'\n", "# expected '$expected'\n"); } - _expect($pass, _where(), @mess); + _ok($pass, _where(), @mess); } # Note: this isn't quite as fancy as Test::More::like(). @@ -96,7 +89,7 @@ sub like { "# expected /$expected/\n"); } } - _expect($pass, _where(), @mess); + _ok($pass, _where(), @mess); } sub pass { @@ -133,7 +126,7 @@ sub require_ok { eval <