Add or amplify inline comments as to placement of file in t/opbasic.
authorJames E Keenan <jkeenan@cpan.org>
Sun, 2 Dec 2012 13:45:43 +0000 (08:45 -0500)
committerJames E Keenan <jkeenan@cpan.org>
Sat, 8 Dec 2012 01:05:02 +0000 (20:05 -0500)
For RT #115838

t/opbasic/arith.t
t/opbasic/cmp.t
t/opbasic/concat.t
t/opbasic/magic_phase.t
t/opbasic/qq.t

index 3c91971..d85a9ba 100644 (file)
@@ -5,6 +5,10 @@ BEGIN {
     @INC = '../lib';
 }
 
+# This file has been placed in t/opbasic to indicate that it should not use
+# functions imported from t/test.pl or Test::More, as those programs/libraries
+# use operators which are what is being tested in this file.
+
 print "1..167\n";
 
 sub try ($$$) {
index 0fbca5f..43e4345 100644 (file)
@@ -5,7 +5,11 @@ BEGIN {
        @INC = '../lib';
 }
 
-# 2s complement assumption. Won't break test, just makes the internals of
+# This file has been placed in t/opbasic to indicate that it should not use
+# functions imported from t/test.pl or Test::More, as those programs/libraries
+# use operators which are what is being tested in this file.
+
+# 2s complement assumption. Will not break test, just makes the internals of
 # the SVs less interesting if were not on 2s complement system.
 my $uv_max = ~0;
 my $uv_maxm1 = ~0 ^ 1;
@@ -55,7 +59,7 @@ print "1..$expect\n";
 my $bad_NaN = 0;
 
 {
-    # gcc's -ffast-math option may stop NaNs working correctly
+    # gcc -ffast-math option may stop NaNs working correctly
     use Config;
     my $ccflags = $Config{ccflags} // '';
     $bad_NaN = 1 if $ccflags =~ /-ffast-math\b/;
index e2e2c66..f020992 100644 (file)
@@ -5,7 +5,11 @@ BEGIN {
     @INC = '../lib';
 }
 
-# This ok() function is specially written to avoid any concatenation.
+# ok() functions from other sources (e.g., t/test.pl) may use concatenation,
+# but that is what is being tested in this file.  Hence, we place this file
+# in the directory where do not use t/test.pl, and we write an ok() function
+# specially written to avoid any concatenation.
+
 my $test = 1;
 sub ok {
     my($ok, $name) = @_;
index 07b4c19..d721705 100644 (file)
@@ -5,8 +5,9 @@ use warnings;
 
 # Test ${^GLOBAL_PHASE}
 #
-# Test::More, test.pl, etc assert plans in END, which happens before global
-# destruction, so we don't want to use those here.
+# Test::More, t/test.pl, etc., assert plans in END, which happens before global
+# destruction. We do not want to use those programs/libraries here, so we
+# place this file in directory t/opbasic.
 
 BEGIN { print "1..7\n" }
 
index 3d1bfac..8dac6ec 100644 (file)
@@ -5,6 +5,9 @@ BEGIN {
     @INC = '../lib';
 }
 
+# This file uses a specially crafted is() function rather than that found in
+# t/test.pl or Test::More.  Hence, we place this file in directory t/opbasic.
+
 print q(1..28
 );
 
@@ -20,7 +23,7 @@ sub is {
     }
     foreach ($left, $right) {
       # Comment out these regexps to map non-printables to ord if the perl under
-      # test is so broken that it's not helping
+      # test is so broken that it is not helping
       s/([^-+A-Za-z_0-9])/sprintf q{'.chr(%d).'}, ord $1/ge;
       $_ = sprintf q('%s'), $_;
       s/^''\.//;