diff options
Diffstat (limited to 'contrib/perl5/t/op/cmp.t')
-rwxr-xr-x | contrib/perl5/t/op/cmp.t | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/contrib/perl5/t/op/cmp.t b/contrib/perl5/t/op/cmp.t deleted file mode 100755 index 4a7e68d..0000000 --- a/contrib/perl5/t/op/cmp.t +++ /dev/null @@ -1,35 +0,0 @@ -#!./perl - -@FOO = ('s', 'N/A', 'a', 'NaN', -1, undef, 0, 1); - -$expect = ($#FOO+2) * ($#FOO+1); -print "1..$expect\n"; - -my $ok = 0; -for my $i (0..$#FOO) { - for my $j ($i..$#FOO) { - $ok++; - my $cmp = $FOO[$i] <=> $FOO[$j]; - if (!defined($cmp) || - $cmp == -1 && $FOO[$i] < $FOO[$j] || - $cmp == 0 && $FOO[$i] == $FOO[$j] || - $cmp == 1 && $FOO[$i] > $FOO[$j]) - { - print "ok $ok\n"; - } - else { - print "not ok $ok ($FOO[$i] <=> $FOO[$j]) gives: '$cmp'\n"; - } - $ok++; - $cmp = $FOO[$i] cmp $FOO[$j]; - if ($cmp == -1 && $FOO[$i] lt $FOO[$j] || - $cmp == 0 && $FOO[$i] eq $FOO[$j] || - $cmp == 1 && $FOO[$i] gt $FOO[$j]) - { - print "ok $ok\n"; - } - else { - print "not ok $ok ($FOO[$i] cmp $FOO[$j]) gives '$cmp'\n"; - } - } -} |