AlgoCpp/t/04-nthread.t

filter: Statementstmt 100% 40 / 40 Branchbran 50.0% 3 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 94.1% 48 / 51 CC 1 SCAR 0.0
CC
1
Cov
93%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Search/Fzf/Tui.pm ↑ Summary AlgoCpp/t/02-asynread.t »
1 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 1 ▶use Search::Fzf::AlgoCpp;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Test::More tests => 2;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 open my $fileH, "<t/testfile";
8  
9 1 my $tac = 1;
10 1 my $caseInsensitive = 1;
11 1 my $nth = 1;
12 1 my @filter=(1,3,4);
13 1 my $delim = "\\s+";
14 1 my $headerLines = 0;
15 1 my $algo = Search::Fzf::AlgoCpp->newAlgoCpp($tac, $caseInsensitive, $headerLines, $nth, $delim, \@filter);
16 1 $algo->asynRead($fileH);
17 1 while(1) {
18 1 ▶ last if $algo->getReaderStatus() == 1;
Branch: 1 branch
BranchTrueFalseTotal
if $algo->getReaderStatus == 1 1 0 1
19 }
20 1 close $fileH;
21  
22 1 my $iPattern = "9";
23 1 my $isSort = 1;
24 1 my $threadNum = 4;
25 1 my $algoType = 1; # 0---Exact 1---V1 2---V2
26 #first match
27 1 my $ret = $algo->matchList($iPattern, $isSort, $caseInsensitive, $algoType, $threadNum);
28 1 my $matchNum = scalar @{$ret};
29  
30 1 ▶ok($matchNum == 3, "test of algo V2.") || print "Bail out!\n";
Branch: 1 branch
BranchTrueFalseTotal
&ok($matchNum == 3, "test of algo V2.") or print "Bail out!\n" 1 0 1
31  
32 1 $iPattern = "99";
33 1 $ret = $algo->matchList($iPattern, $isSort, $caseInsensitive, $algoType, $threadNum);
34  
35 1 $matchNum = scalar @{$ret};
36 1 ▶ok($matchNum == 2, "continue test of algo V2.") || print "Bail out!\n";
Branch: 1 branch
BranchTrueFalseTotal
&ok($matchNum == 2, "continue test of algo V2.") or print "Bail out!\n" 1 0 1
37  
« blib/lib/Search/Fzf/Tui.pm ↑ Summary AlgoCpp/t/02-asynread.t »