From: Michael G. Schwern Date: Tue, 6 Nov 2001 20:58:45 +0000 (-0500) Subject: Adding isnt() and next_test() X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3e90d5a3156f71fc1a63780fe898a92da05fc766;p=p5sagit%2Fp5-mst-13.2.git Adding isnt() and next_test() Message-ID: <20011106205845.G29411@blackrider> p4raw-id: //depot/perl@12878 --- diff --git a/t/test.pl b/t/test.pl index 46d0656..6caa865 100644 --- a/t/test.pl +++ b/t/test.pl @@ -71,6 +71,17 @@ sub is { _ok($pass, _where(), @mess); } +sub isnt { + my ($got, $isnt, $name, @mess) = @_; + my $pass = $got ne $isnt; + unless( $pass ) { + unshift(@mess, "# It should not be " . + ( defined $got ? $got : "undef" ) . "\n", + "# but it is.\n"); + } + _ok($pass, _where(), $name, @mess); +} + # Note: this isn't quite as fancy as Test::More::like(). sub like { my ($got, $expected, @mess) = @_; @@ -100,6 +111,10 @@ sub fail { _ok(0, _where(), @_); } +sub next_test { + $test++ +} + # Note: can't pass multipart messages since we try to # be compatible with Test::More::skip(). sub skip {