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

Lines Matching defs:Test

1 package Test::More;
6 use Test::Builder;
37 my $Test = Test::Builder->new;
54 Test::More - yet another framework for writing test scripts
58 use Test::More tests => $Num_Tests;
60 use Test::More qw(no_plan);
62 use Test::More skip_all => $reason;
109 my @status = Test::More::status;
118 Test::Simple first. This is a drop in replacement for Test::Simple
134 The preferred way to do this is to declare a plan when you C<use Test::More>.
136 use Test::More tests => $Num_Tests;
142 use Test::More qw(no_plan);
144 B<NOTE>: using no_plan requires a Test::Harness upgrade else it will
149 use Test::More skip_all => $skip_reason;
152 exit immediately with a zero (success). See L<Test::Harness> for
155 If you want to control what functions Test::More will export, you
159 use Test::More tests => 23, import => ['!fail'];
164 use Test::More;
169 use Test::More;
171 plan skip_all => 'Test irrelevant on MacOS';
197 $Test->plan(@cleaned_plan);
205 $Test->exported_to($caller);
230 =head2 Test names
293 This is actually Test::Simple's ok() routine.
299 $Test->ok($test, $name);
362 $Test->is_eq(@_);
366 $Test->isnt_eq(@_);
403 $Test->like(@_);
417 $Test->unlike(@_);
455 $Test->cmp_ok(@_);
493 my $ok = $Test->ok( 0, "$class->can(...)" );
494 $Test->diag(' can_ok() called with no methods');
509 my $ok = $Test->ok( !@nok, $name );
511 $Test->diag(map " $class->can('$_') failed\n", @nok);
541 (for example 'Test customer').
586 $ok = $Test->ok( 0, $name );
587 $Test->diag(" $diag\n");
590 $ok = $Test->ok( 1, $name );
615 $Test->ok(1, @_);
619 $Test->ok(0, @_);
656 Test::More. C<use Test::More tests => 1, 'no_diag'>. This is useful
669 $Test->diag(@_);
746 my $ok = $Test->ok( !$@, "use $module;" );
752 $Test->diag(<<DIAGNOSTIC);
786 my $ok = $Test->ok( !$@, "require $module;" );
790 $Test->diag(<<DIAGNOSTIC);
823 L<Test::Harness>.
825 The way Test::More handles this is with a named block. Basically, a
856 code I<won't be run at all>. Test::More will output special ok's
857 which Test::Harness interprets as skipped, but passing, tests.
864 the label C<SKIP>, or Test::More can't work its magic.
879 unless $Test->has_plan eq 'no_plan';
884 $Test->skip($why);
914 With a todo block, the tests inside are expected to fail. Test::More
916 they are "todo". Test::Harness will interpret failures as being ok.
929 B<NOTE>: TODO tests require a Test::Harness upgrade else it will
948 tests will be marked as failing but todo. Test::Harness will
959 unless $Test->has_plan eq 'no_plan';
964 $Test->todo_skip($why);
989 instances, Test::More provides a handful of useful functions.
1004 Test::Differences and Test::Deep provide more in-depth functionality
1030 $ok = $Test->is_eq($this, $that, $name);
1036 $ok = $Test->ok(1, $name);
1039 $ok = $Test->ok(0, $name);
1040 $ok = $Test->diag(_format_stack(@Data_Stack));
1159 $Test->_unoverload(\$e1, \$e2);
1286 =head2 Extending and Embedding Test::More
1288 Sometimes the Test::More interface isn't quite enough. Fortunately,
1289 Test::More is built on top of Test::Builder which provides a single,
1291 libraries which both use Test::Builder B<can be used together in the
1295 you can access the underlying Test::Builder object like so:
1301 my $test_builder = Test::More->builder;
1303 Returns the Test::Builder object underlying Test::More for you to play
1309 return Test::Builder->new;
1317 If all your tests passed, Test::Builder will exit with zero (which is
1320 will be considered failures. If no tests were ever run Test::Builder
1340 Test::More works with Perls as old as 5.004_05.
1346 Test::More from piercing an object's interface allowing better blackbox
1352 suggest Test::Deep which contains more flexible testing functions for
1358 Test::More will only be aware of threads if "use threads" has been done
1359 I<before> Test::More is loaded. This is ok:
1362 use Test::More;
1366 use Test::More
1370 =item Test::Harness upgrade
1372 no_plan and todo depend on new Test::Harness features and fixes. If
1374 end-users will have to upgrade Test::Harness to the latest one on
1375 CPAN. If you avoid no_plan and TODO tests, the stock Test::Harness
1378 Installing Test::More should also upgrade Test::Harness.
1385 This is a case of convergent evolution with Joshua Pritikin's Test
1388 figure out how to easily wedge test names into Test's interface (along
1393 providing more flexibility than the existing Test.pm. As such, the
1400 L<Test::Simple> if all this confuses you and you just want to write
1401 some tests. You can upgrade to Test::More later (it's forward
1404 L<Test> is the old testing module. Its main benefit is that it has
1407 L<Test::Harness> for details on how your test results are interpreted
1410 L<Test::Differences> for more ways to test complex data structures.
1411 And it plays well with Test::More.
1413 L<Test::Class> is like XUnit but more perlish.
1415 L<Test::Deep> gives you more powerful complex data structure testing.
1417 L<Test::Unit> is XUnit style testing.
1419 L<Test::Inline> shows the idea of embedded testing.
1421 L<Bundle::Test> installs a whole bunch of useful test modules.
1427 from Joshua Pritikin's Test module and lots of help from Barrie