Lines Matching refs:ntests
32 our @EXPORT = qw( ntests ok is match flush skip_all test_expect callsign banner );
50 my ($ntests, $ok_count);
60 # ntests($n)
63 # before ntests() then the results are cached instead of being printed
64 # to STDOUT. When ntests() is called, the total number of tests
65 # (including any cached) is known and the "1..$ntests" line can be
70 sub ntests {
71 $ntests = shift;
74 $ntests += $EXTRA + scalar @results;
76 print $ntests ? "1..$ntests\n" : "1..$ntests # skip $REASON\n";
88 # line accordingly. If ntests() hasn't been called then we cached
95 # cache results if ntests() not yet called
159 ntests(0)
196 # The number of tests is determined and ntests() is called to generate
220 ntests(1); ok(0);
238 ntests(3 + scalar(@tests) * 2);
544 The C<test_expect()> sub counts the number of tests, and then calls L<ntests()>
545 to generate the familiar "C<1..$ntests\n>" test harness line. Each
551 test results are cached until L<ntests()> is called and the final number of
552 tests can be calculated. Then, the "C<1..$ntests>" line is output, along with
566 value (default: C<0>) is added to the grand total calculated by L<ntests()>.
584 C<ntests($n)> to declare the number of tests and generate the test
588 ntests(2);
620 =head2 ntests()