Skip to content

Commit

Permalink
Remove duplicate done-testing text
Browse files Browse the repository at this point in the history
  • Loading branch information
m-dango committed Nov 26, 2016
1 parent 97836f7 commit c72b2e9
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions doc/Language/testing.pod6
Expand Up @@ -211,37 +211,6 @@ Adding C<plan> gives a true picture of the test:
Note that leaving the C<done-testing> in place will have no effect on the new test
results, but it should be removed for clarity.
It is recommended that the C<done-testing> function be removed and replaced
with a valid C<plan> function when all tests are finalized. Use of C<plan> can help
detect test failures otherwise not reported because tests were accidentally skipped
due to bugs in the tests or bugs in the compiler. For example:
sub do-stuff {@};
use Test;
ok .is-prime for do-stuff;
done-testing;
# output:
1..0
The above example is where a naive C<done-testing> fails. C<do-stuff()> returned
nothing and tested nothing, even though it should've returned results to test. But
the test suite doesn't know how many tests were meant to be run, so it passes.
Adding C<plan> gives a true picture of the test:
sub do-stuff {@};
use Test;
plan 1;
ok .is-prime for do-stuff;
# output:
1..1
# Looks like you planned 1 test, but ran 0
Note that leaving the C<done-testing> in place will have no effect on the new test
results, but it should be removed for clarity.
=head1 Testing return values
The C<Test> module exports various functions that check the return value of a
Expand Down

0 comments on commit c72b2e9

Please sign in to comment.