New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test cleanup 3 #109
Test cleanup 3 #109
Conversation
Changes Unknown when pulling ef5bed4 on test-cleanup-3 into * on master*. |
Changes Unknown when pulling 08f129c on test-cleanup-3 into * on master*. |
Changes Unknown when pulling e5b309c on test-cleanup-3 into * on master*. |
Changes Unknown when pulling e5b309c on test-cleanup-3 into * on master*. |
I've taken the liberty of squashing together the commits that had the same label ie were on the same file. |
|
||
ok(1); | ||
done_testing; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've got both tests => 1, and done_testing
. Pick one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, does having both help in case the test segfaults? I think you're right, I should remove it.
bfa94de
to
04e74e5
Compare
0bbaf96
to
8733e16
Compare
Both converting all tests from hand-written TAP to `Test::More` and converting from `Test` to `Test::More` have been completed.
b0fcf1e
to
ccf1eba
Compare
TODO:
|
Looks good to me. |
I'll finish the last couple TODOs this weekend just to make sure everything checks out and then do the long-awaited merge! |
After doing a line-by-line comparison of the output, this is now ready to merge. |
Resolves #8, #9.
using
Test::More
module (no hand-rolled TAP orTest
module)use strict; use warnings
everywhereremove use of
$a
,$b
lexicals (reserved forsort
function)using
Test::Exception
(lives_ok, dies_ok, etc.) rather than theeval { $code }; ok $@
combinationmake each individual test run in its own scope
e.g.
This makes tests not dependent on previous code which means that they can be
moved around without worrying about state. In the future, these should be setup
as labelled subtests.
Using
all approx( ... )
instead of a customtapprox( ... )
in each file.