This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Give names to all tests in t/comp/fold.t
authorNicholas Clark <nick@ccl4.org>
Fri, 9 Oct 2009 17:16:35 +0000 (19:16 +0200)
committerNicholas Clark <nick@ccl4.org>
Fri, 9 Oct 2009 18:26:18 +0000 (20:26 +0200)
t/comp/fold.t

index 6b18212..0e507c3 100644 (file)
@@ -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