Branch Coverage

xsubs/enum.xs
Criterion Covered Total %
branch 60 70 85.7


line true false branch
31 6 52 CHECK_PARSE_DATA;
32 46 6 CHECK_VOID_CONTEXT;
6 46 CHECK_VOID_CONTEXT;
4 2 CHECK_VOID_CONTEXT;
34 46 0 context = GIMME_V;
36 246 46 LL_foreach(pEnumSpec, li, THIS->cpi.enums)
246 46 LL_foreach(pEnumSpec, li, THIS->cpi.enums)
37 48 198 if (pEnumSpec->identifier[0] && pEnumSpec->enumerators)
34 14 if (pEnumSpec->identifier[0] && pEnumSpec->enumerators)
39 27 7 if (context == G_ARRAY)
40 0 27 XPUSHs(sv_2mortal(newSVpv(pEnumSpec->identifier, 0)));
44 39 7 if (context == G_ARRAY)
69 6 82 CHECK_PARSE_DATA;
70 76 6 CHECK_VOID_CONTEXT;
6 76 CHECK_VOID_CONTEXT;
4 2 CHECK_VOID_CONTEXT;
72 76 0 context = GIMME_V;
74 28 48 if (context == G_SCALAR && items != 2)
7 21 if (context == G_SCALAR && items != 2)
75 0 7 XSRETURN_IV(items > 1 ? items-1 : LL_count(THIS->cpi.enums));
77 36 33 if (items > 1)
81 44 36 for (i = 1; i < items; i++)
83 44 0 const char *name = SvPV_nolen(ST(i));
86 20 24 if (name[0] == 'e' &&
20 0 if (name[0] == 'e' &&
87 20 0 name[1] == 'n' &&
88 13 7 name[2] == 'u' &&
89 13 0 name[3] == 'm' &&
93 5 44 while (isSPACE(*name))
98 24 20 if (pEnumSpec)
111 12 21 if (size <= 0)
114 21 0 EXTEND(SP, size);
0 21 EXTEND(SP, size);
116 65 21 LL_foreach(pEnumSpec, li, THIS->cpi.enums)
65 21 LL_foreach(pEnumSpec, li, THIS->cpi.enums)