From: Nicholas Clark Date: Fri, 9 Oct 2009 17:16:35 +0000 (+0200) Subject: Give names to all tests in t/comp/fold.t X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a6d95d3b2a78200d46f5f1182e3d35b2fcc34eae;p=p5sagit%2Fp5-mst-13.2.git Give names to all tests in t/comp/fold.t --- diff --git a/t/comp/fold.t b/t/comp/fold.t index 6b18212..0e507c3 100644 --- a/t/comp/fold.t +++ b/t/comp/fold.t @@ -18,22 +18,22 @@ plan (13); my $a; $a = eval '$b = 0/0 if 0; 3'; -is ($a, 3); -is ($@, ""); +is ($a, 3, 'constants in conditionals don\'t affect constant folding'); +is ($@, '', 'no error'); my $b = 0; $a = eval 'if ($b) {return sqrt -3} 3'; -is ($a, 3); -is ($@, ""); +is ($a, 3, 'variables in conditionals don\'t affect constant folding'); +is ($@, '', 'no error'); $a = eval q{ $b = eval q{if ($b) {return log 0} 4}; - is ($b, 4); - is ($@, ""); + is ($b, 4, 'inner eval folds constant'); + is ($@, '', 'no error'); 5; }; -is ($a, 5); -is ($@, ""); +is ($a, 5, 'outer eval folds constant'); +is ($@, '', 'no error'); # warn and die hooks should be disabled during constant folding