Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Eliminates wrong preamble (for a method), closes #2799
  • Loading branch information
JJ committed May 17, 2019
1 parent 8c2c982 commit 7b9506c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions doc/Type/Test.pod6
Expand Up @@ -642,18 +642,16 @@ throws-like { EVAL q[ fac("foo") ] }, X::TypeCheck::Argument;
Defined as:
=for code :preamble<use Test;>
sub fails-like ( \test where Callable:D|Str:D, $ex-type, $reason?, *%matcher)
sub fails-like ( \test where Callable:D|Str:D, $ex-type, $reason?, *%matcher)
Same interface as C<throws-like>, except checks that the code returns a
L<Failure|/type/Failure> instead of throwing. If the code does throw or if the
returned L<Failure|/type/Failure> has already been L<handled|/routine/handled>,
that will be considered as a failed test.
=for code :preamble<use Test;>
fails-like { +"a" }, X::Str::Numeric,
:message(/'Cannot convert string to number'/),
fails-like { +"a" }, X::Str::Numeric,
:message(/'Cannot convert string to number'/),
'converting non-numeric string to number fails';
=head2 sub subtest
Expand Down

0 comments on commit 7b9506c

Please sign in to comment.