• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/timemachine/db-4.7.25.NC/perl/BerkeleyDB/t/Test/

Lines Matching defs:Test

1 package Test::Builder;
14 # Make Test::Builder thread-safe for ithreads.
70 Test::Builder - Backend for building test libraries
74 package My::Test::Module;
75 use Test::Builder;
80 my $Test = Test::Builder->new;
81 $Test->output('my_logfile');
87 $Test->exported_to($pack);
88 $Test->plan(@_);
96 $Test->ok($test, $name);
102 Test::Simple and Test::More have proven to be popular testing modules,
103 but they're not always flexible enough. Test::Builder provides the a
113 my $Test = Test::Builder->new;
115 Returns a Test::Builder object representing the current state of the
119 Test::Builder object. No matter how many times you call new(), you're
124 my $Test = Test::Builder->new;
127 $Test ||= bless ['Move along, nothing to see here'], $class;
128 return $Test;
133 $Test->reset;
135 Reinitializes the Test::Builder singleton to its original state.
158 $Test->reset;
196 my $pack = $Test->exported_to;
197 $Test->exported_to($pack);
199 Tells Test::Builder what package you exported your functions to.
215 $Test->plan('no_plan');
216 $Test->plan( skip_all => $reason );
217 $Test->plan( tests => $num_tests );
219 A convenient way to set up your tests. Call this and Test::Builder
265 my $max = $Test->expected_tests;
266 $Test->expected_tests($max);
292 $Test->no_plan;
305 $plan = $Test->has_plan
320 $Test->skip_all;
321 $Test->skip_all($reason);
345 Test::More.
353 $Test->ok($test, $name);
356 like Test::Simple's ok().
403 $name =~ s|#|\\#|g; # # in a name can confuse Test::Harness.
457 $Test->is_eq($got, $expected, $name);
459 Like Test::More's is(). Checks if $got eq $expected. This is the
464 $Test->is_num($got, $expected, $name);
466 Like Test::More's is(). Checks if $got == $expected. This is the
531 $Test->isnt_eq($got, $dont_expect, $name);
533 Like Test::More's isnt(). Checks if $got ne $dont_expect. This is
538 $Test->is_num($got, $dont_expect, $name);
540 Like Test::More's isnt(). Checks if $got ne $dont_expect. This is
580 $Test->like($this, qr/$regex/, $name);
581 $Test->like($this, '/$regex/', $name);
583 Like Test::More's like(). Checks if $this matches the given $regex.
589 $Test->unlike($this, qr/$regex/, $name);
590 $Test->unlike($this, '/$regex/', $name);
592 Like Test::More's unlike(). Checks if $this B<does not match> the
613 $Test->maybe_regex(qr/$regex/);
614 $Test->maybe_regex('/$regex/');
697 $Test->cmp_ok($this, $type, $that, $name);
699 Works just like Test::More's cmp_ok().
701 $Test->cmp_ok($big_num, '!=', $other_big_num);
743 $Test->BAILOUT($reason);
745 Indicates to the Test::Harness that things are going so badly all
762 $Test->skip;
763 $Test->skip($why);
796 $Test->_print($out);
804 $Test->todo_skip;
805 $Test->todo_skip($why);
838 $Test->_print($out);
848 $Test->skip_rest;
849 $Test->skip_rest($reason);
862 =head2 Test style
868 $Test->level($how_high);
870 How far up the call stack should $Test look when reporting where the
875 Setting $Test::Builder::Level overrides. This is typically useful
879 local $Test::Builder::Level = 2;
880 $Test->ok($test);
897 $Test->use_numbers($on_or_off);
914 Test::Harness will accept either, but avoid mixing the two styles.
931 $Test->no_header($no_header);
937 $Test->no_ending($no_ending);
939 Normally, Test::Builder does some extra diagnostics when the test
972 Test::Builder's default output settings will not be affected.
978 $Test->diag(@msgs);
1029 $Test->_print(@msgs);
1050 # confuse Test::Harness.
1062 $Test->_print_diag(@msg);
1078 $Test->output($fh);
1079 $Test->output($file);
1087 $Test->failure_output($fh);
1088 $Test->failure_output($file);
1096 $Test->todo_output($fh);
1097 $Test->todo_output($file);
1185 $Test->output(\*TESTOUT);
1186 $Test->failure_output(\*TESTERR);
1187 $Test->todo_output(\*TESTOUT);
1202 =head2 Test Status and Info
1208 my $curr_test = $Test->current_test;
1209 $Test->current_test($num);
1256 my @tests = $Test->summary;
1273 my @tests = $Test->details;
1285 'ok' is true if Test::Harness will consider the test to be a pass.
1301 Sometimes the Test::Builder test counter is incremented without it
1303 In these cases, Test::Builder doesn't know the result of the test, so
1326 my $todo_reason = $Test->todo;
1327 my $todo_reason = $Test->todo($pack);
1330 will be considered 'todo' (see Test::More and Test::Harness for
1356 my $package = $Test->caller;
1357 my($pack, $file, $line) = $Test->caller;
1358 my($pack, $file, $line) = $Test->caller($height);
1465 # "require Test::Simple" doesn't puke.
1534 $Test->_ending if defined $Test and !$Test->no_ending;
1539 If all your tests passed, Test::Builder will exit with zero (which is
1542 will be considered failures. If no tests were ever run Test::Builder
1558 In perl 5.8.0 and later, Test::Builder is thread-safe. The test
1562 Test::Builder is only thread-aware if threads.pm is loaded I<before>
1563 Test::Builder.
1567 CPAN can provide the best examples. Test::Simple, Test::More,
1568 Test::Exception and Test::Differences all use Test::Builder.
1572 Test::Simple, Test::More, Test::Harness