]> git.vpit.fr Git - perl/modules/Test-Leaner.git/blobdiff - t/22-cmp_ok.t
Test ok() return value, with overloading, and failing
[perl/modules/Test-Leaner.git] / t / 22-cmp_ok.t
diff --git a/t/22-cmp_ok.t b/t/22-cmp_ok.t
deleted file mode 100644 (file)
index ad880f3..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-#!perl -T
-
-use strict;
-use warnings;
-
-use Test::Leaner tests => 4 * 10 + 7 + 10;
-
-my @num_tests = (
- [ '1.0', '==', '1.0' ],
- [ '1e0', '==', '1e0' ],
- [ '1.0', '<=', '1.0' ],
- [ '1.0', '>=', '1.0' ],
- [ '1.0', '<=', '2.0' ],
- [ '1.0', '<',  '2.0' ],
- [ '2.0', '>=', '1.0' ],
- [ '2.0', '>',  '1.0' ],
- [ '1.0', '!=', '2.0' ],
- [ '2.0', '!=', '1.0' ],
-);
-
-for my $t (@num_tests) {
- my ($x, $op, $y) = @$t;
- cmp_ok $x,      $op, $y;
- cmp_ok int($x), $op, $y;
- cmp_ok $x,      $op, int($y);
- cmp_ok int($x), $op, int($y);
-}
-
-my @str_tests = (
- [ 'a', 'eq', 'a' ],
- [ 'a', 'le', 'b' ],
- [ 'a', 'lt', 'b' ],
- [ 'b', 'ge', 'a' ],
- [ 'b', 'gt', 'a' ],
- [ 'a', 'ne', 'b' ],
- [ 'b', 'ne', 'a' ],
-);
-
-for my $t (@str_tests) {
- my ($x, $op, $y) = @$t;
- cmp_ok $x, $op, $y;
-}
-
-my @logic_tests = (
- [ 1, 'or',  0 ],
- [ 0, 'or',  1 ],
- [ 1, 'or',  1 ],
- [ 1, 'xor', 0 ],
- [ 0, 'xor', 1 ],
- [ 1, 'and', 1 ],
-
- [ 1, '||', 0 ],
- [ 0, '||', 1 ],
- [ 1, '||', 1 ],
- [ 1, '&&', 1 ],
-);
-
-for my $t (@logic_tests) {
- my ($x, $op, $y) = @$t;
- cmp_ok $x, $op, $y;
-}