diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-10-09 13:44:10 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-10-09 20:26:17 +0200 |
commit | 3d899d640007cb6cbc676620da4d0aba415fdff6 (patch) | |
tree | 4e695be7c71899cb781c8532a3f5013b5b182741 /t | |
parent | 91937335c7980d01674367559f12bd1ab53b6d56 (diff) | |
download | perl-3d899d640007cb6cbc676620da4d0aba415fdff6.tar.gz |
In opt(), use is(..., undef) rather than ok(!defined ...)
Diffstat (limited to 't')
-rw-r--r-- | t/comp/uproto.t | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/t/comp/uproto.t b/t/comp/uproto.t index 9b908eb54a..265854f79e 100644 --- a/t/comp/uproto.t +++ b/t/comp/uproto.t @@ -65,7 +65,11 @@ like( $@, qr/Malformed prototype for main::wrong1/, 'wrong1' ); eval q{ sub wrong2 ($__); wrong2(1,2) }; like( $@, qr/Malformed prototype for main::wrong2/, 'wrong2' ); -sub opt ($;_) { is($_[0], "seen"); ok(!defined $_[1], "; has precedence over _") } +sub opt ($;_) { + is($_[0], "seen"); + is($_[1], undef, "; has precedence over _"); +} + opt("seen"); sub unop (_) { is($_[0], 11, "unary op") } |