Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Adds flunk and is-approx-calculate
The first had been left out accidentally, the second was
missing. Closes #2330.
  • Loading branch information
JJ committed Sep 26, 2018
1 parent c10703f commit 763b010
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions doc/Type/Test.pod6
Expand Up @@ -270,6 +270,17 @@ is-approx $value, $expected, :rel-tol<.5>, :abs-tol<10>;
When both absolute and relative tolerances are specified, each will be
tested independently, and the C<is-approx> test will succeed only if both pass.
=head2 is-approx-calculate
Defined as:
sub is-approx-calculate ($got,$expected,$abs-tol where { !.defined or $_ >= 0 },$rel-tol where { !.defined or $_ >= 0 },$desc)
This is the actual routine called by
L<C<is-approx> when absolute and relative tolerance are specified|/type/Test#Both_absolute_and_relative_tolerance_specified>.
They are
tested independently, and the test succeeds only if both pass.
=head2 is-deeply
Defined as:
Expand Down Expand Up @@ -752,6 +763,12 @@ Since these subroutines do not provide indication of what value was received
and what was expected, they should be used sparingly, such as when evaluating
a complex test condition.
=head2 flunk
multi sub flunk($reason = '')
The opposite of C<pass>, makes a test fail with an optional message.
=head2 diag
sub diag($message)
Expand Down

0 comments on commit 763b010

Please sign in to comment.