Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[S24] made all parameters optional
Also added back some clarification that optional parameters can
be implemented in other ways, for example using multi dispatch.
  • Loading branch information
Carl Masak committed Dec 31, 2010
1 parent 3f49fb7 commit 167354e
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions S24-testing.pod
Expand Up @@ -14,7 +14,7 @@ Synopsis 24: Testing
Created: 30 Dec 2010

Last Modified: 31 Dec 2010
Version: 5
Version: 6

=head1 SYNOPSIS

Expand Down Expand Up @@ -61,19 +61,20 @@ file, or if the call occurred between calling two test functions

=head2 Test functions

All test functions take a description argument, which will be
printed along with the C<ok> or C<not ok> result and the test
number. Except in the case of the functions C<pass> and C<flunk>,
this description is optional.
All test functions take an optional description argument, which
will be printed along with the C<ok> or C<not ok> result and the test
number. Note that what is displayed as optional parameters in the list
below might as well be implemented by some other mechanism, such as
several C<multi sub>s. Such details are left as implementation-dependent.

The names of positional parameters are non-normative, so supplying the
positional arguments to these test files by name is discouraged.

All of the following functions are exported by default:

# unconditional passing/failing
pass($desc)
flunk($desc)
pass($desc?)
flunk($desc?)

# evaluates $cond in boolean context
ok(Mu $cond, $desc?)
Expand Down

0 comments on commit 167354e

Please sign in to comment.