From: Rafael Garcia-Suarez Date: Wed, 2 Jul 2003 21:38:19 +0000 (+0000) Subject: Minor test adjustments : X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c3029c660c41826954b460e82523f3ba1f91d479;p=p5sagit%2Fp5-mst-13.2.git Minor test adjustments : - test name correction in op/concat.t by Yitzchak Scott-Thoennes - prototypes added to some public functions in t/test.pl, as suggested by Enache Adrian p4raw-id: //depot/perl@19941 --- diff --git a/t/op/concat.t b/t/op/concat.t index d515a59..97a5200 100644 --- a/t/op/concat.t +++ b/t/op/concat.t @@ -107,5 +107,5 @@ sub beq { use bytes; $_[0] eq $_[1]; } { my $a; ($a .= 5) . 6; - ok($a == 5, "($a .= 5) . 6 - present since 5.000"); + ok($a == 5, '($a .= 5) . 6 - present since 5.000'); } diff --git a/t/test.pl b/t/test.pl index 1a16fba..81605f5 100644 --- a/t/test.pl +++ b/t/test.pl @@ -81,7 +81,7 @@ sub _where { } # DON'T use this for matches. Use like() instead. -sub ok { +sub ok ($@) { my ($pass, $name, @mess) = @_; _ok($pass, _where(), $name, @mess); } @@ -131,7 +131,7 @@ sub display { return @result; } -sub is { +sub is ($$@) { my ($got, $expected, $name, @mess) = @_; my $pass; @@ -150,7 +150,7 @@ sub is { _ok($pass, _where(), $name, @mess); } -sub isnt { +sub isnt ($$@) { my ($got, $isnt, $name, @mess) = @_; my $pass; @@ -169,7 +169,7 @@ sub isnt { _ok($pass, _where(), $name, @mess); } -sub cmp_ok { +sub cmp_ok ($$$@) { my($got, $type, $expected, $name, @mess) = @_; my $pass; @@ -202,7 +202,7 @@ sub cmp_ok { # otherwise $range is a fractional error. # Here $range must be numeric, >= 0 # Non numeric ranges might be a useful future extension. (eg %) -sub within { +sub within ($$$@) { my ($got, $expected, $range, $name, @mess) = @_; my $pass; if (!defined $got or !defined $expected or !defined $range) { @@ -234,7 +234,7 @@ sub within { } # Note: this isn't quite as fancy as Test::More::like(). -sub like { +sub like ($$@) { my ($got, $expected, $name, @mess) = @_; my $pass; if (ref $expected eq 'Regexp') { @@ -320,7 +320,7 @@ sub eq_hash { !$fail; } -sub require_ok { +sub require_ok ($) { my ($require) = @_; eval <