Branch Coverage

xs-src/unpack.c
Criterion Covered Total %
branch 81 168 48.2


line true false branch
61 0 18 PUSHMARK(SP);
66 18 0 FREETMPS;
70 0 18 if(!SvOK(sv)) {
0 0 if(!SvOK(sv)) {
0 0 if(!SvOK(sv)) {
80 486 509 if(value) {
81 9 477 if(!MY_CXT.msgpack_true) {
87 9 500 if(!MY_CXT.msgpack_false) {
264 12 43 *o = ((l==0) ? newSVpvs("") : newSVpvn(p, l));
272 478 2251 *o = ((l==0) ? newSVpvs("") : newSVpvn(p, l));
273 4 2725 if(u->utf8) {
308 21 136 if(SvROK(self) && SvTYPE(SvRV(self)) == SVt_PVHV) {
21 0 if(SvROK(self) && SvTYPE(SvRV(self)) == SVt_PVHV) {
313 6 15 if(svp) {
314 6 0 u.utf8 = SvTRUE(*svp) ? true : false;
0 6 u.utf8 = SvTRUE(*svp) ? true : false;
0 0 u.utf8 = SvTRUE(*svp) ? true : false;
0 6 u.utf8 = SvTRUE(*svp) ? true : false;
0 0 u.utf8 = SvTRUE(*svp) ? true : false;
0 0 u.utf8 = SvTRUE(*svp) ? true : false;
0 6 u.utf8 = SvTRUE(*svp) ? true : false;
0 0 u.utf8 = SvTRUE(*svp) ? true : false;
0 0 u.utf8 = SvTRUE(*svp) ? true : false;
0 0 u.utf8 = SvTRUE(*svp) ? true : false;
0 0 u.utf8 = SvTRUE(*svp) ? true : false;
0 0 u.utf8 = SvTRUE(*svp) ? true : false;
6 0 u.utf8 = SvTRUE(*svp) ? true : false;
6 0 u.utf8 = SvTRUE(*svp) ? true : false;
0 6 u.utf8 = SvTRUE(*svp) ? true : false;
0 0 u.utf8 = SvTRUE(*svp) ? true : false;
0 0 u.utf8 = SvTRUE(*svp) ? true : false;
6 0 u.utf8 = SvTRUE(*svp) ? true : false;
0 0 u.utf8 = SvTRUE(*svp) ? true : false;
318 0 157 if (!(items == 2 || items == 3)) {
323 157 0 const char* const dptr = SvPV_const(data, dlen);
334 0 157 if(ret < 0) {
336 0 157 } else if(ret == 0) {
339 44 113 if(from < dlen) {
354 0 37 if (items != 1) {
377 0 2 if (!(items == 1 || items == 2)) {
380 2 0 UNPACKER(ST(0), mp);
0 2 UNPACKER(ST(0), mp);
0 2 UNPACKER(ST(0), mp);
381 1 1 mp->user.utf8 = (items == 1 || sv_true(ST(1))) ? true : false;
0 1 mp->user.utf8 = (items == 1 || sv_true(ST(1))) ? true : false;
387 0 4 if (items != 1) {
390 4 0 UNPACKER(ST(0), mp);
0 4 UNPACKER(ST(0), mp);
0 4 UNPACKER(ST(0), mp);
391 2 2 ST(0) = boolSV(mp->user.utf8);
399 0 1706 if(offset >= limit) {
405 1706 0 UNPACKER(self, mp);
0 1706 UNPACKER(self, mp);
0 1706 UNPACKER(self, mp);
408 1706 0 const char* dptr = SvPV_nolen_const(data);
411 1468 238 if(SvCUR(mp->user.buffer) != 0) {
413 1468 0 dptr = SvPV_const(mp->user.buffer, dlen);
422 0 1706 if(ret < 0) {
428 1468 238 if(!mp->user.finished) {
447 224 1482 if (items == 2) {
450 224 0 else if (items == 3) {
451 0 224 offset = SvUVx(ST(2));
457 1706 0 dXSTARG;
465 0 0 if (items != 4) {
471 0 0 UV const offset = SvUVx(ST(2));
472 0 0 UV const limit = SvUVx(ST(3));
474 0 0 dXSTARG;
482 0 87 if (items != 1) {
486 87 0 UNPACKER(ST(0), mp);
0 87 UNPACKER(ST(0), mp);
0 87 UNPACKER(ST(0), mp);
487 0 87 ST(0) = boolSV(mp->user.finished);
493 0 238 if (items != 1) {
497 238 0 UNPACKER(ST(0), mp);
0 238 UNPACKER(ST(0), mp);
0 238 UNPACKER(ST(0), mp);
504 0 207 if (items != 1) {
508 207 0 UNPACKER(ST(0), mp);
0 207 UNPACKER(ST(0), mp);
0 207 UNPACKER(ST(0), mp);
521 0 37 if (items != 1) {
525 37 0 UNPACKER(ST(0), mp);
0 37 UNPACKER(ST(0), mp);
0 37 UNPACKER(ST(0), mp);