summaryrefslogtreecommitdiff
path: root/lib/Time
diff options
context:
space:
mode:
authorMichiel Beijen <mb@x14.nl>2021-12-03 07:56:08 +0100
committerMichiel Beijen <mb@x14.nl>2021-12-04 15:55:55 +0100
commit70cbce258a2f0c602dd4e986bb1d31ec3d459158 (patch)
treecac900e71152888dba2c76b0974db2d87ab49e09 /lib/Time
parente728f790bcefcaf1d8b42e2f7ee16a9125f0af22 (diff)
downloadperl-70cbce258a2f0c602dd4e986bb1d31ec3d459158.tar.gz
do not count tests, instead use done_testing()
Having to count tests is annoying for maintainers. Also, manually updating count tests is problematic when multiple people are working on the same code; it causes merge conflicts and recounts. done_testing() is available since Test::More 0.88 which was released in 2009. This commit changes all tests under lib/ that use Test::More and were planning the number of tests. Michiel Beijen is now a Perl author
Diffstat (limited to 'lib/Time')
-rw-r--r--lib/Time/gmtime.t4
-rw-r--r--lib/Time/localtime.t4
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/Time/gmtime.t b/lib/Time/gmtime.t
index 54f64357f0..2ed85b826b 100644
--- a/lib/Time/gmtime.t
+++ b/lib/Time/gmtime.t
@@ -7,8 +7,6 @@ BEGIN {
@times = (-2**55, -2**50, -2**33, -2**31-1, -1, 0, 1, 2**31-1, 2**33, 2**50, 2**55, time);
@methods = qw(sec min hour mday mon year wday yday isdst);
- plan tests => (@times * (@methods + 1)) + 1;
-
use_ok Time::gmtime;
}
@@ -21,3 +19,5 @@ for my $time (@times) {
is $gmtime->$method, shift @gmtime, "gmtime($time)->$method";
}
}
+
+done_testing();
diff --git a/lib/Time/localtime.t b/lib/Time/localtime.t
index 0d75dcbab9..afafa6f76c 100644
--- a/lib/Time/localtime.t
+++ b/lib/Time/localtime.t
@@ -7,8 +7,6 @@ BEGIN {
@times = (-2**55, -2**50, -2**33, -2**31-1, -1, 0, 1, 2**31-1, 2**33, 2**50, 2**55, time);
@methods = qw(sec min hour mday mon year wday yday isdst);
- plan tests => (@times * (@methods + 1)) + 1;
-
use_ok Time::localtime;
}
@@ -21,3 +19,5 @@ for my $time (@times) {
is $localtime->$method, shift @localtime, "localtime($time)->$method";
}
}
+
+done_testing();