Lines Matching refs:test

41 Test::Builder - Backend for building test libraries
65 my($test, $name) = @_;
67 $Test->ok($test, $name);
75 building block upon which to write your own test libraries I<which can
87 test.
89 Since you only run one test per program, there is B<one and only one>
186 Gets/sets the # of tests we expect this test to run and prints out
209 Declares that this test will run an indeterminate # of tests.
270 $Test->ok($test, $name);
272 Your basic test. Pass if $test is true, fail if $test is false. Just
278 my($self, $test, $name) = @_;
280 # $test might contain an object which we don't want to accidentally
282 $test = $test ? 1 : 0;
286 Carp::croak("You tried to run a test without a plan! Gotta have a plan.");
293 You named your test '$name'. You shouldn't use numbers for your test names.
305 unless( $test ) {
310 @$result{ 'ok', 'actual_ok' } = ( 1, $test );
341 unless( $test ) {
343 $self->diag(" $msg test ($file at line $line)\n");
346 return $test ? 1 : 0;
371 my $test = !defined $got && !defined $expect;
373 $self->ok($test, $name);
374 $self->_is_diag($got, 'eq', $expect) unless $test;
375 return $test;
387 my $test = !defined $got && !defined $expect;
389 $self->ok($test, $name);
390 $self->_is_diag($got, '==', $expect) unless $test;
391 return $test;
445 my $test = defined $got || defined $dont_expect;
447 $self->ok($test, $name);
448 $self->_cmp_diag('ne', $got, $dont_expect) unless $test;
449 return $test;
461 my $test = defined $got || defined $dont_expect;
463 $self->ok($test, $name);
464 $self->_cmp_diag('!=', $got, $dont_expect) unless $test;
465 return $test;
561 my $test = $this =~ /$usable_regex/ ? 1 : 0;
562 $test = !$test if $cmp eq '!~';
563 $ok = $self->ok( $test, $name );
592 my $test;
597 $test = eval "\$got $type \$expect";
600 my $ok = $self->ok($test, $name);
630 testing should terminate. This includes running any additional test
649 Skips the current test, reporting $why.
691 Like skip(), only it will declare the test as failing and TODO. Similar
740 and terminates the test.
743 test.
759 test failed.
768 $Test->ok($test);
789 Whether or not the test should output numbers. That is, this if true:
801 Most useful when you can't depend on the test output order, such as
830 Normally, Test::Builder does some extra diagnostics when the test
861 Controlling where the test output goes.
863 It's ok for your test to change where STDOUT and STDERR point to,
873 handle, but if this is for a TODO test, the todo_output() handle is
877 with test output. A newline will be put on the end if there isn't one
883 a failing test (C<ok() || diag()>) it "passes through" the failure.
954 Where normal "ok/not ok" test output should go.
963 Where diagnostic output on test failures and diag() should go.
972 Where diagnostics about todo test failures and diag() should go.
1013 die "Can't open test output log $file_or_fh: $!";
1024 # test suites while still getting normal test output.
1060 Gets/sets the current test # we're on.
1073 Carp::croak("Can't change the current test number without a plan!");
1084 reason => 'incrementing test number',
1103 Of course, test #1 is $tests[0], etc...
1120 { 'ok' => is the test considered a pass?
1122 name => name of the test (if any)
1123 type => type of test (if any, see below).
1127 'ok' is true if Test::Harness will consider the test to be a pass.
1129 'actual_ok' is a reflection of whether or not the test literally
1133 'name' is the name of the test.
1135 'type' indicates if it was a special test. Normal tests have a type
1143 Sometimes the Test::Builder test counter is incremented without it
1144 printing any test output, for example, when current_test() is changed.
1145 In these cases, Test::Builder doesn't know the result of the test, so
1153 { ok => 1, # logically, the test passed since it's todo
1226 Runs a bunch of end of test sanity checks to make sure reality came
1350 Looks like your test died just after $Curr_Test.
1363 Looks like your test died before it could output anything.
1378 In perl 5.8.0 and later, Test::Builder is thread-safe. The test
1380 the test number using current_test() they will all be effected.