Branch Coverage

src/xs/compare.cc
Criterion Covered Total %
branch 102 154 66.2


line true false branch
9 0 19 if (HvUSEDKEYS(f) != HvUSEDKEYS(s)) return false;
0 19 if (HvUSEDKEYS(f) != HvUSEDKEYS(s)) return false;
1 18 if (HvUSEDKEYS(f) != HvUSEDKEYS(s)) return false;
12 1 17 if (!farr) return true; // both are empty
16 121 4 for (STRLEN i = 0; res && i <= fmax; ++i) {
110 11 for (STRLEN i = 0; res && i <= fmax; ++i) {
18 136 4 for (entry = farr[i]; res && entry; entry = HeNEXT(entry)) {
32 104 for (entry = farr[i]; res && entry; entry = HeNEXT(entry)) {
20 32 0 SV** sref = hv_fetchhek(s, hek, 0);
21 2 30 if (!sref) return false;
22 30 0 res = _elem_cmp(aTHX_ HeVAL(entry), *sref);
31 0 9 if (lasti != AvFILLp(s)) return false;
36 525 2 while (res && lasti-- >= 0) {
519 6 while (res && lasti-- >= 0) {
519 8 while (res && lasti-- >= 0) {
37 1 518 if ((bool)*fl ^ (bool)*sl) return false; // one is null while another is not.
44 493 112 if (f == s) return true;
46 53 59 if (SvROK(f) | SvROK(s)) { /* unroll references */
47 78 45 while (SvROK(f) & SvROK(s)) {
50 2 76 if (SvOBJECT(fval) ^ SvOBJECT(sval)) return false;
51 12 64 if (SvOBJECT(fval)) {
52 1 11 if (fval == sval) return true;
53 2 9 if (SvSTASH(fval) != SvSTASH(sval)) return false;
54 4 5 if (HvAMAGIC(SvSTASH(fval))) { // class has operator overloadings
55 4 0 SV* const tmpsv = amagic_call(f, s, eq_amg, 0);
56 3 1 if (tmpsv) return SvTRUE(tmpsv); // class has '==' operator overloading
3 0 if (tmpsv) return SvTRUE(tmpsv); // class has '==' operator overloading
0 3 if (tmpsv) return SvTRUE(tmpsv); // class has '==' operator overloading
0 0 if (tmpsv) return SvTRUE(tmpsv); // class has '==' operator overloading
0 0 if (tmpsv) return SvTRUE(tmpsv); // class has '==' operator overloading
0 3 if (tmpsv) return SvTRUE(tmpsv); // class has '==' operator overloading
0 0 if (tmpsv) return SvTRUE(tmpsv); // class has '==' operator overloading
0 0 if (tmpsv) return SvTRUE(tmpsv); // class has '==' operator overloading
3 0 if (tmpsv) return SvTRUE(tmpsv); // class has '==' operator overloading
3 0 if (tmpsv) return SvTRUE(tmpsv); // class has '==' operator overloading
3 0 if (tmpsv) return SvTRUE(tmpsv); // class has '==' operator overloading
2 1 if (tmpsv) return SvTRUE(tmpsv); // class has '==' operator overloading
2 0 if (tmpsv) return SvTRUE(tmpsv); // class has '==' operator overloading
0 0 if (tmpsv) return SvTRUE(tmpsv); // class has '==' operator overloading
0 0 if (tmpsv) return SvTRUE(tmpsv); // class has '==' operator overloading
0 0 if (tmpsv) return SvTRUE(tmpsv); // class has '==' operator overloading
0 0 if (tmpsv) return SvTRUE(tmpsv); // class has '==' operator overloading
0 0 if (tmpsv) return SvTRUE(tmpsv); // class has '==' operator overloading
0 0 if (tmpsv) return SvTRUE(tmpsv); // class has '==' operator overloading
0 0 if (tmpsv) return SvTRUE(tmpsv); // class has '==' operator overloading
63 4 41 if (SvROK(f) | SvROK(s)) return false; /* asymmetric references */
64 2 39 if (f == s) return true;
75 3 61 if (SvOK(f) && SvOK(s)) { // both are not undefs
3 0 if (SvOK(f) && SvOK(s)) { // both are not undefs
0 3 if (SvOK(f) && SvOK(s)) { // both are not undefs
3 58 if (SvOK(f) && SvOK(s)) { // both are not undefs
3 0 if (SvOK(f) && SvOK(s)) { // both are not undefs
0 3 if (SvOK(f) && SvOK(s)) { // both are not undefs
76 0 58 if (SvTYPE(s) > SVt_PVMG) return false; // wrong type
77 15 43 if (SvPOK(f) | SvPOK(s)) return strEQ(SvPV_nolen(f), SvPV_nolen(s)); // both strings
13 2 if (SvPOK(f) | SvPOK(s)) return strEQ(SvPV_nolen(f), SvPV_nolen(s)); // both strings
10 5 if (SvPOK(f) | SvPOK(s)) return strEQ(SvPV_nolen(f), SvPV_nolen(s)); // both strings
78 4 39 if (SvNOK(f) | SvNOK(s)) return SvNV(f) == SvNV(s); // natural values
3 1 if (SvNOK(f) | SvNOK(s)) return SvNV(f) == SvNV(s); // natural values
2 2 if (SvNOK(f) | SvNOK(s)) return SvNV(f) == SvNV(s); // natural values
81 3 3 return !(SvOK(f) || SvOK(s));
3 0 return !(SvOK(f) || SvOK(s));
3 0 return !(SvOK(f) || SvOK(s));
1 2 return !(SvOK(f) || SvOK(s));
1 0 return !(SvOK(f) || SvOK(s));
1 0 return !(SvOK(f) || SvOK(s));
83 19 0 return SvTYPE(s) == SVt_PVHV && hv_compare(aTHX_ (HV*)f, (HV*)s);
12 7 return SvTYPE(s) == SVt_PVHV && hv_compare(aTHX_ (HV*)f, (HV*)s);
85 9 0 return SvTYPE(s) == SVt_PVAV && av_compare(aTHX_ (AV*)f, (AV*)s);
6 3 return SvTYPE(s) == SVt_PVAV && av_compare(aTHX_ (AV*)f, (AV*)s);
87 1 0 return SvTYPE(s) == SVt_PVIO && PerlIO_fileno(IoIFP(f)) == PerlIO_fileno(IoIFP(s));
0 1 return SvTYPE(s) == SVt_PVIO && PerlIO_fileno(IoIFP(f)) == PerlIO_fileno(IoIFP(s));
89 3 0 return SvTYPE(s) == SVt_REGEXP && strEQ(SvPV_nolen(f), SvPV_nolen(s));
0 3 return SvTYPE(s) == SVt_REGEXP && strEQ(SvPV_nolen(f), SvPV_nolen(s));
0 3 return SvTYPE(s) == SVt_REGEXP && strEQ(SvPV_nolen(f), SvPV_nolen(s));
1 2 return SvTYPE(s) == SVt_REGEXP && strEQ(SvPV_nolen(f), SvPV_nolen(s));
99 0 57 if ((bool)f ^ (bool)s) return false;