src/xs/Io.cc

filter: Statementstmt 100% 17 / 17 Branchbran 85.0% 17 / 20 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 91.8% 34 / 37 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« t/typemap/typemap.xs ↑ Summary src/xs/Scalar.cc »
1 #include <xs/Io.h>
2  
3 namespace xs {
4  
5 125 void Io::_validate () {
6 125 ▶ if (!sv) return;
Branch: 1 branch
BranchTrueFalseTotal
if (!sv) return; 0 125 125
7 125 ▶ if (SvTYPE(sv) == SVt_PVIO) return;
Branch: 1 branch
BranchTrueFalseTotal
if (SvTYPE(sv) == SVt_PVIO) return; 11 114 125
8 114 ▶ if (SvTYPE(sv) == SVt_PVGV && GvIOp(sv)) {
Branch: 2 branches
BranchTrueFalseTotal
if (SvTYPE(sv) == SVt_PVGV && GvIOp(sv)) { 10 104 114
if (SvTYPE(sv) == SVt_PVGV && GvIOp(sv)) { 9 1 10
9 9 Sv::operator=(GvIOp(sv));
10 9 return;
11 }
12  
13 105 ▶ if (SvROK(sv)) {
Branch: 1 branch
BranchTrueFalseTotal
if (SvROK(sv)) { 60 45 105
14 60 SV* val = SvRV(sv);
15 60 ▶ if (SvTYPE(val) == SVt_PVIO) {
Branch: 1 branch
BranchTrueFalseTotal
if (SvTYPE(val) == SVt_PVIO) { 47 13 60
16 47 Sv::operator=(val);
17 47 return;
18 }
19 13 ▶ if (SvTYPE(val) == SVt_PVGV && GvIOp(val)) {
Branch: 2 branches
BranchTrueFalseTotal
if (SvTYPE(val) == SVt_PVGV && GvIOp(val)) { 8 5 13
if (SvTYPE(val) == SVt_PVGV && GvIOp(val)) { 8 0 8
20 8 Sv::operator=(GvIOp(val));
21 8 return;
22 }
23 }
24  
25 50 ▶ if (is_undef()) return reset();
Branch: 1 branch
BranchTrueFalseTotal
if (is_undef()) return reset(); 4 46 50
26 46 reset();
27 46 ▶ throw std::invalid_argument("SV is neither IO or IO reference, nor Glob or Glob reference with IO slot set");
Branch: 1 branch
BranchTrueFalseTotal
throw std::invalid_argument("SV is neither IO or IO reference, nor Glob or Glob reference with IO slot set"); 46 0 46
28 }
29  
30 }
« t/typemap/typemap.xs ↑ Summary src/xs/Scalar.cc »