Skip to content

Commit 167354e

Browse files
author
Carl Masak
committed
[S24] made all parameters optional
Also added back some clarification that optional parameters can be implemented in other ways, for example using multi dispatch.
1 parent 3f49fb7 commit 167354e

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

S24-testing.pod

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Synopsis 24: Testing
1414
Created: 30 Dec 2010
1515

1616
Last Modified: 31 Dec 2010
17-
Version: 5
17+
Version: 6
1818

1919
=head1 SYNOPSIS
2020

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

6262
=head2 Test functions
6363

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

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

7273
All of the following functions are exported by default:
7374

7475
# unconditional passing/failing
75-
pass($desc)
76-
flunk($desc)
76+
pass($desc?)
77+
flunk($desc?)
7778

7879
# evaluates $cond in boolean context
7980
ok(Mu $cond, $desc?)

0 commit comments

Comments
 (0)