CCS/t/common.plt

filter: Statementstmt 100% 19 / 19 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 96.0% 24 / 25 CC 2 SCAR 3.4
CC
2
Cov
95%
BEGIN
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
« CCS/t/02_indexing.t ↑ Summary CCS/Utils/t/02_encode.t »
1 # -*- Mode: CPerl -*-
2 # File: CCS/t/common.plt
3 # Description: common subs & data for PDL/CCS/t/*.t
4  
5 ##-- common subs
6 6 ▶BEGIN {
Subroutine BEGIN: called CC=2 SCAR=7.0
7 6 ▶ use File::Basename;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 6 ▶ use Cwd;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 6 my $topdir = Cwd::abs_path(dirname(__FILE__)."/../..");
10 6 ▶ do "$topdir/t/common.plt" or die("$0: failed to load $topdir/t/common.plt: $@");
Branch: 1 branch
BranchTrueFalseTotal
do "$topdir/t/common.plt" or die "$0: failed to load $topdir/t/common.plt: $@" 6 0 6
11 }
12  
13 ##-- common modules
14 6 ▶use PDL;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 #-- common data
17 6 our $a = pdl(double, [
18 [10,0,0,0,-2],
19 [3,9,0,0,0],
20 [0,7,8,6,0],
21 [3,0,8,7,5],
22 [0,8,0,9,7],
23 [0,4,0,0,2],
24 ]);
25 6 our $abad = ($a==0);
26 6 our $agood = !$abad;
27 6 our $awhich = $a->whichND;
28 6 our $avals = $a->indexND($awhich);
29  
30 6 our $BAD = pdl(0)->setvaltobad(0);
31  
32 6 print "loaded ", __FILE__, "\n";
33  
34 6 1;
« CCS/t/02_indexing.t ↑ Summary CCS/Utils/t/02_encode.t »