lib/Chj/noTEST.pm

filter: Statementstmt 85.7% 24 / 28 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 63.6% 7 / 11 Podpod 0.0% 0 / 5 totaltotal 70.4% 31 / 44 CC 1 SCAR 3.1
CC
1
Cov
86%
TEST_STDOUT
2.0
TEST_EXCEPTION
2.0
GIVES
2.0
CRAP 1.4
« lib/PXML/Tags.pm ↑ Summary lib/FP/PureArray/t.pm »
1 #
2 # Copyright (c) 2013-2019 Christian Jaeger, copying@christianjaeger.ch
3 #
4 # This is free software, offered under either the same terms as perl 5
5 # or the terms of the Artistic License version 2 or the terms of the
6 # MIT License (Expat version). See the file COPYING.md that came
7 # bundled with this file.
8 #
9  
10 =head1 NAME
11  
12 Chj::noTEST
13  
14 =head1 SYNOPSIS
15  
16 1 ▶ use Chj::noTEST; # instead of `use Chj::TEST;`
Subroutine BEGIN: called CC=1 SCAR=0.0
17 TEST { foo() } "bar"; # will be ignored / garbage collected right away
18  
19 =head1 DESCRIPTION
20  
21 Disable TEST and TEST_STDOUT forms within a package, perhaps because
22 they currently fail or are slow, or so that they never use memory.
23  
24 Note that you can alternatively ignore *all* test forms within the
25 whole program by setting the TEST environment variable to 0. Also you
26 can pass package names to `run_tests` to limit the tests to run to
27 those within the given packages.
28  
29 =head1 SEE ALSO
30  
31 L<Chj::TEST>
32  
33 =head1 NOTE
34  
35 This is alpha software! Read the status section in the package README
36 or on the L<website|http://functional-perl.org/>.
37  
38 =cut
39  
40 package Chj::noTEST;
41 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
42 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
43 2 ▶use warnings FATAL => 'uninitialized';
Subroutine BEGIN: called CC=1 SCAR=0.0
44 2 ▶use Exporter "import";
Subroutine BEGIN: called CC=1 SCAR=0.0
45  
46 2 our @EXPORT = qw(TEST TEST_STDOUT TEST_EXCEPTION GIVES perhaps_run_tests);
47 2 our @EXPORT_OK = qw();
48 2 our %EXPORT_TAGS = (all => [@EXPORT, @EXPORT_OK]);
49  
50 2 ▶use Chj::TEST ();
Subroutine BEGIN: called CC=1 SCAR=0.0
51  
52 #*import = \&Chj::TEST::import;
53  
54 # to avoid the redefinition warning, use the glob:
55 2 *import = *Chj::TEST::import;
56  
57 1 ▶sub TEST (&$) { () }
Subroutine TEST: called CC=1 SCAR=0.0
Pod undocumented
58  
59 0 ▶sub TEST_STDOUT (&$) { () }
Subroutine TEST_STDOUT: not called CC=1 SCAR=6.9
Pod undocumented
60  
61 0 ▶sub TEST_EXCEPTION (&$) { () }
Subroutine TEST_EXCEPTION: not called CC=1 SCAR=6.9
Pod undocumented
62  
63 0 ▶sub GIVES (&) { () }
Subroutine GIVES: not called CC=1 SCAR=6.9
Pod undocumented
64  
65 0 ▶sub perhaps_run_tests { () }
Subroutine perhaps_run_tests: not called CC=1 SCAR=6.9
Pod undocumented
66  
67 2 1
« lib/PXML/Tags.pm ↑ Summary lib/FP/PureArray/t.pm »