Branch Coverage

src/types.c
Criterion Covered Total %
branch 28 212 13.2


line true false branch
30 0 13 if(*p == '-') p++;
32 0 13 if (!*p) return FALSE;
34 26 0 while(*p){
35 13 13 if(!isDIGIT(*p)){
46 0 9 if(nv == (NV)(IV)nv){
64 0 0 if ( !SvPOKp(klass) || !SvCUR(klass) ) { /* XXX: SvPOK does not work with magical scalars */
0 0 if ( !SvPOKp(klass) || !SvCUR(klass) ) { /* XXX: SvPOK does not work with magical scalars */
69 0 0 if ( !stash ) {
73 0 0 if (( gvp = (GV**)hv_fetchs(stash, "VERSION", FALSE) )) {
74 0 0 if ( isGV(*gvp) && GvSV(*gvp) && SvOK(GvSV(*gvp)) ){
0 0 if ( isGV(*gvp) && GvSV(*gvp) && SvOK(GvSV(*gvp)) ){
0 0 if ( isGV(*gvp) && GvSV(*gvp) && SvOK(GvSV(*gvp)) ){
79 0 0 if (( gvp = (GV**)hv_fetchs(stash, "ISA", FALSE) )) {
80 0 0 if ( isGV(*gvp) && GvAV(*gvp) && av_len(GvAV(*gvp)) != -1 ) {
0 0 if ( isGV(*gvp) && GvAV(*gvp) && av_len(GvAV(*gvp)) != -1 ) {
0 0 if ( isGV(*gvp) && GvAV(*gvp) && av_len(GvAV(*gvp)) != -1 ) {
86 0 0 while (( he = hv_iternext(stash) )) {
88 0 0 if ( isGV(gv) ) {
89 0 0 if ( GvCVu(gv) ) { /* is GV and has CV */
0 0 if ( GvCVu(gv) ) { /* is GV and has CV */
94 0 0 else if ( SvOK(gv) ) { /* is a stub or constant */
109 0 340 if ( ( flags & TYPE_OTHER ) == TYPE_OTHER ) {
110 0 0 if ( !check_cv ) {
120 0 0 PUSHMARK(SP);
121 0 0 EXTEND(SP, 1);
126 0 0 result = count ? POPs : &PL_sv_undef;
128 0 0 FREETMPS;
134 0 340 if ( flags & TYPE_ARRAYREF ) {
135 0 0 if ( !IsArrayRef(val) ) {
0 0 if ( !IsArrayRef(val) ) {
0 0 if ( !IsArrayRef(val) ) {
138 0 0 if ( flags == TYPE_ARRAYREF ) {
145 0 0 for (i = 0; i < len; i++) {
147 0 0 if ( ! check_type(subval, newflags, NULL) ) {
154 0 340 if ( flags & TYPE_HASHREF ) {
155 0 0 if ( !IsHashRef(val) ) {
0 0 if ( !IsHashRef(val) ) {
0 0 if ( !IsHashRef(val) ) {
158 0 0 if ( flags == TYPE_HASHREF ) {
165 0 0 while ((he = hv_iternext(hv))) {
167 0 0 if ( ! check_type(subval, newflags, NULL) ) {
181 0 0 return SvOK(val) && SvROK(val);
0 0 return SvOK(val) && SvROK(val);
183 0 0 if ( SvROK(val) || isGV(val) ) {
0 0 if ( SvROK(val) || isGV(val) ) {
186 0 0 else if ( sv_true( val ) ) {
187 0 0 if ( SvPOKp(val) ) {
189 0 0 return SvCUR(val) == 1 && SvPVX(val)[0] == '1';
0 0 return SvCUR(val) == 1 && SvPVX(val)[0] == '1';
191 0 0 else if ( SvIOKp(val) ) {
195 0 0 else if( SvNOKp(val) ) {
203 0 0 return len == 1 && ptr[0] == '1';
0 0 return len == 1 && ptr[0] == '1';
213 340 0 if ( SvOK(val) && !SvROK(val) && !isGV(val) ) {
339 1 if ( SvOK(val) && !SvROK(val) && !isGV(val) ) {
339 0 if ( SvOK(val) && !SvROK(val) && !isGV(val) ) {
214 0 339 if ( SvPOK(val) ) {
217 339 0 else if ( SvIOK(val) ) {
220 0 0 else if ( SvNOK(val) ) {
226 0 0 if ( (!SvOK(val)) || SvROK(val) || isGV(val) ) {
0 0 if ( (!SvOK(val)) || SvROK(val) || isGV(val) ) {
0 0 if ( (!SvOK(val)) || SvROK(val) || isGV(val) ) {
229 0 0 if ( SvPOKp(val) ){
230 0 0 if ( ! _S_pv_is_integer( SvPVX(val) ) ) {
234 0 0 else if ( SvIOKp(val) ) {
237 0 0 else if ( SvNOKp(val) ) {
238 0 0 if ( ! _S_nv_is_integer( SvNVX(val) ) ) {
244 0 0 return ( (len > 0 && i[0] != '-') ? TRUE : FALSE );
0 0 return ( (len > 0 && i[0] != '-') ? TRUE : FALSE );
250 0 0 if ( ! looks_like_number(val) ) {
256 0 0 return SvOK(val) && !SvROK(val) && !isGV(val);
0 0 return SvOK(val) && !SvROK(val) && !isGV(val);
0 0 return SvOK(val) && !SvROK(val) && !isGV(val);
258 0 0 if ( SvOK(val) && !SvROK(val) && !isGV(val) ) {
0 0 if ( SvOK(val) && !SvROK(val) && !isGV(val) ) {
0 0 if ( SvOK(val) && !SvROK(val) && !isGV(val) ) {
266 0 0 return IsObject(val);
0 0 return IsObject(val);
268 0 0 return IsScalarRef(val);
0 0 return IsScalarRef(val);
0 0 return IsScalarRef(val);
270 0 0 return IsCodeRef(val);
0 0 return IsCodeRef(val);
0 0 return IsCodeRef(val);
455 0 9 if (is_array && is_hash) {
0 0 if (is_array && is_hash) {
483 0 9 if (is_array) {
488 0 9 if (is_hash) {
504 0 9 if (!val)
510 9 0 if (varname) {
511 0 9 if (ix < 0) {
525 0 9 PUSHMARK(SP);
527 0 9 if (element_type_tiny && SvROK(element_type_tiny) && SvOBJECT(SvRV(element_type_tiny)))
0 0 if (element_type_tiny && SvROK(element_type_tiny) && SvOBJECT(SvRV(element_type_tiny)))
0 0 if (element_type_tiny && SvROK(element_type_tiny) && SvOBJECT(SvRV(element_type_tiny)))
530 0 0 XPUSHs(element_type_tiny);
532 0 0 XPUSHs(&PL_sv_undef);
534 0 0 XPUSHs(sv_2mortal(newSVsv(val)));
536 0 0 XPUSHs(sv_2mortal(newSVpvs("varname")));
537 0 0 XPUSHs(sv_2mortal(full_varname));
544 0 9 XPUSHs(&PL_sv_undef);
547 0 9 XPUSHs(type_name_sv);
549 0 9 XPUSHs(sv_2mortal(newSVsv(val)));
551 0 9 XPUSHs(sv_2mortal(newSVpvs("varname")));
552 0 9 XPUSHs(sv_2mortal(full_varname));
559 0 0 FREETMPS;