diff options
author | markm <markm@FreeBSD.org> | 2000-06-25 11:04:01 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2000-06-25 11:04:01 +0000 |
commit | 2618fad5bbb2d0182eb31ed805c41b543c513940 (patch) | |
tree | 52ba93338b13aefd02a0055304a9eccfa0e049f5 /contrib/perl5/t/op/inc.t | |
parent | 77644ee620b6a79cf8c538abaf7cd301a875528d (diff) | |
download | FreeBSD-src-2618fad5bbb2d0182eb31ed805c41b543c513940.zip FreeBSD-src-2618fad5bbb2d0182eb31ed805c41b543c513940.tar.gz |
Vendor import of Perl 5.006
Diffstat (limited to 'contrib/perl5/t/op/inc.t')
-rwxr-xr-x | contrib/perl5/t/op/inc.t | 53 |
1 files changed, 49 insertions, 4 deletions
diff --git a/contrib/perl5/t/op/inc.t b/contrib/perl5/t/op/inc.t index e5a2a92..f59115e 100755 --- a/contrib/perl5/t/op/inc.t +++ b/contrib/perl5/t/op/inc.t @@ -1,9 +1,6 @@ #!./perl - -# $RCSfile$ - -print "1..6\n"; +print "1..12\n"; # Verify that addition/subtraction properly upgrade to doubles. # These tests are only significant on machines with 32 bit longs, @@ -50,3 +47,51 @@ if ($a == -2147483649) {print "ok 6\n"} else {print "not ok 6\n";} + +$a = 2147483648; +$a = -$a; +$c=$a--; +if ($a == -2147483649) + {print "ok 7\n"} +else + {print "not ok 7\n";} + +$a = 2147483648; +$a = -$a; +$c=--$a; +if ($a == -2147483649) + {print "ok 8\n"} +else + {print "not ok 8\n";} + +$a = 2147483648; +$a = -$a; +$a=$a-1; +if ($a == -2147483649) + {print "ok 9\n"} +else + {print "not ok 9\n";} + +$a = 2147483648; +$b = -$a; +$c=$b--; +if ($b == -$a-1) + {print "ok 10\n"} +else + {print "not ok 10\n";} + +$a = 2147483648; +$b = -$a; +$c=--$b; +if ($b == -$a-1) + {print "ok 11\n"} +else + {print "not ok 11\n";} + +$a = 2147483648; +$b = -$a; +$b=$b-1; +if ($b == -(++$a)) + {print "ok 12\n"} +else + {print "not ok 12\n";} |