From 3d899d640007cb6cbc676620da4d0aba415fdff6 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Fri, 9 Oct 2009 13:44:10 +0200 Subject: In opt(), use is(..., undef) rather than ok(!defined ...) --- t/comp/uproto.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 't') 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") } -- cgit v1.2.1