Branch Coverage

OrderedHash.xs
Criterion Covered Total %
branch 92 130 70.7


line true false branch
44 3 41 if ((items - 1) % 2 != 0) {
48 20 41 for (i = 1; i + 1 < items; i += 2) {
74 7 85 if (!he) {
79 85 0 if (vslot && *vslot) {
85 0 if (vslot && *vslot) {
102 9 10077 if (he) {
110 9 0 if (vslot && *vslot && !SvREADONLY(*vslot)) {
9 0 if (vslot && *vslot && !SvREADONLY(*vslot)) {
9 0 if (vslot && *vslot && !SvREADONLY(*vslot)) {
114 0 0 if (!av_store(vals, pos, vcopy))
127 0 10077 if (!av_store(vals, newpos, vcopy))
130 0 10077 if (!hv_store_ent(idx, key_sv, idx_sv, 0))
142 0 17 RETVAL = hv_exists_ent(idx, key, 0) ? 1 : 0;
157 14 6 RETVAL = got ? newSVsv(got) : newSV(0);
177 25 57 if (av_len(keys) < 0) {
182 57 0 if (!kslot || !*kslot) {
0 57 if (!kslot || !*kslot) {
206 20143 0 if (pos < 0 || pos > av_len(keys)) XSRETURN_UNDEF;
51 20092 if (pos < 0 || pos > av_len(keys)) XSRETURN_UNDEF;
208 20092 0 if (!kslot || !*kslot) XSRETURN_UNDEF;
0 20092 if (!kslot || !*kslot) XSRETURN_UNDEF;
219 0 9 RETVAL = tie_oh_count(aTHX_ self) > 0 ? 1 : 0;
234 1 3 if ((items - 1) % 2 != 0) {
238 5 3 for (i = 1; i + 1 < items; i += 2) {
255 1 4 if ((items - 1) % 2 != 0)
257 5 4 for (i = 1; i + 1 < items; i += 2) {
263 0 4 RETVAL = (int)tie_oh_count(aTHX_ self);
275 4 6 if (!kpop || !vpop) XSRETURN_EMPTY;
0 4 if (!kpop || !vpop) XSRETURN_EMPTY;
276 0 4 EXTEND(SP, 2);
288 4 6 if (!kshift || !vshift) XSRETURN_EMPTY;
0 4 if (!kshift || !vshift) XSRETURN_EMPTY;
289 0 4 EXTEND(SP, 2);
301 1 2 if ((items - 1) % 2 != 0)
306 3 2 for (i = items - 2; i >= 1; i -= 2) {
310 0 2 RETVAL = (int)tie_oh_count(aTHX_ self);
325 13 19 if (items == 1) {
326 13 0 EXTEND(SP, n);
0 13 EXTEND(SP, n);
327 25 13 for (i = 0; i < n; i++) {
329 25 0 PUSHs(slot && *slot ? sv_mortalcopy(*slot) : &PL_sv_undef);
25 0 PUSHs(slot && *slot ? sv_mortalcopy(*slot) : &PL_sv_undef);
333 19 0 EXTEND(SP, items - 1);
0 19 EXTEND(SP, items - 1);
334 29 19 for (j = 1; j < items; j++) {
336 13 16 SSize_t pos = want < 0 ? n + want : want;
337 26 3 if (pos < 0 || pos >= n) {
5 21 if (pos < 0 || pos >= n) {
341 21 0 PUSHs(slot && *slot ? sv_mortalcopy(*slot) : &PL_sv_undef);
21 0 PUSHs(slot && *slot ? sv_mortalcopy(*slot) : &PL_sv_undef);
355 11 13 if (items == 1) {
356 11 0 EXTEND(SP, n);
0 11 EXTEND(SP, n);
357 22 11 for (i = 0; i < n; i++) {
359 22 0 PUSHs(slot && *slot ? sv_mortalcopy(*slot) : &PL_sv_undef);
22 0 PUSHs(slot && *slot ? sv_mortalcopy(*slot) : &PL_sv_undef);
363 13 0 EXTEND(SP, items - 1);
0 13 EXTEND(SP, items - 1);
364 18 13 for (j = 1; j < items; j++) {
366 10 8 SSize_t pos = want < 0 ? n + want : want;
367 16 2 if (pos < 0 || pos >= n) {
1 15 if (pos < 0 || pos >= n) {
371 15 0 PUSHs(slot && *slot ? sv_mortalcopy(*slot) : &PL_sv_undef);
15 0 PUSHs(slot && *slot ? sv_mortalcopy(*slot) : &PL_sv_undef);
380 8 11 RETVAL = (int)tie_oh_count(aTHX_ self);