Lite/Util/t/af_inet6.t

filter: Statementstmt 100% 25 / 25 Branchbran 50.0% 3 / 6 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 83.3% 35 / 42 CC 2 SCAR 2.8
CC
2
Cov
85%
END
2.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« Lite/Util/t/leftshift.t ↑ Summary Lite/t/mask.t »
1 # Before `make install' is performed this script should be runnable with
2 # `make test'. After `make install' it should work as `perl test.pl'
3  
4 ######################### We start with some black magic to print on failure.
5 # Change 1..1 below to 1..last_test_to_print .
6 # (It may become useful if the test is moved to ./t subdirectory.)
7  
8 1 ▶BEGIN { $| = 1; print "1..3\n"; }
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶END {print "not ok 1\n" unless $loaded;}
Subroutine END: called CC=2 SCAR=7.6
Branch: 1 branch
BranchTrueFalseTotal
unless $loaded 0 1 1
10  
11 #use diagnostics;
12 1 ▶use Config;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 1 ▶use NetAddr::IP::InetBase qw(
Subroutine BEGIN: called CC=1 SCAR=0.0
14 AF_INET
15 AF_INET6
16 fake_AF_INET6
17 1 );
18  
19 1 $loaded = 1;
20 1 print "ok 1\n";
21 ######################### End of black magic.
22  
23 # Insert your test code below (better if it prints "ok 13"
24 # (correspondingly "not ok 13") depending on the success of chunk 13
25 # of the test code):
26  
27 1 $test = 2;
28  
29 2 ▶sub ok {
Subroutine ok: called CC=1 SCAR=0.0
30 2 print "ok $test\n";
31 2 ++$test;
32 }
33  
34 ## test 2 - 13 add stuff to buffer
35 1 my $af;
36 1 ▶print "AF_INET = 2 not found in the Socket library\nnot "
Branch: 1 branch
BranchTrueFalseTotal
unless $af = 2 and $af == 2 0 1 1
Condition33%1/3
$af = 2 and $af == 2
!ll&&!rl&&r
001
MC/DC0%0/2
$af = 2 and $af == 2
$af = 2 $af == 2
Truth table33%1/3
A and B
A= $af = 2B= $af == 2
ABresult
0X0
100
111
37 unless ($af = AF_INET()) && $af == 2;
38 1 &ok;
39  
40 1 my $fake = fake_AF_INET6();
41 1 my $af_inet6 = AF_INET6();
42 1 ▶my $txt = $fake
Branch: 1 branch
BranchTrueFalseTotal
$fake ? : 1 0 1
43 ? "\n\tSocket does not have AF_INET6, Socket6 not present\n\tguessed AF_INET6 for '$Config{osname}' = $fake\n"
44 : "\n\tAF_INET6 = $af_inet6 derived from Socket or Socket6\n";
45 1 print STDERR $txt;
46 1 &ok;
« Lite/Util/t/leftshift.t ↑ Summary Lite/t/mask.t »