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 126 5 for (STRLEN i = 0; res && i <= fmax; ++i) {
115 11 for (STRLEN i = 0; res && i <= fmax; ++i) {
18 137 5 for (entry = farr[i]; res && entry; entry = HeNEXT(entry)) {
28 109 for (entry = farr[i]; res && entry; entry = HeNEXT(entry)) {
20 28 0 SV** sref = hv_fetchhek(s, hek, 0);
21 1 27 if (!sref) return false;
22 27 0 res = _elem_cmp(aTHX_ HeVAL(entry), *sref);
31 0 10 if (lasti != AvFILLp(s)) return false;
36 527 2 while (res && lasti-- >= 0) {
520 7 while (res && lasti-- >= 0) {
520 9 while (res && lasti-- >= 0) {
37 1 519 if ((bool)*fl ^ (bool)*sl) return false; // one is null while another is not.
44 493 110 if (f == s) return true;
46 54 56 if (SvROK(f) | SvROK(s)) { /* unroll references */
47 79 46 while (SvROK(f) & SvROK(s)) {
50 2 77 if (SvOBJECT(fval) ^ SvOBJECT(sval)) return false;
51 12 65 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 42 if (SvROK(f) | SvROK(s)) return false; /* asymmetric references */
64 2 40 if (f == s) return true;
75 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
3 55 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 55 if (SvTYPE(s) > SVt_PVMG) return false; // wrong type
77 12 43 if (SvPOK(f) | SvPOK(s)) return strEQ(SvPV_nolen(f), SvPV_nolen(s)); // both strings
10 2 if (SvPOK(f) | SvPOK(s)) return strEQ(SvPV_nolen(f), SvPV_nolen(s)); // both strings
6 6 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 10 0 return SvTYPE(s) == SVt_PVAV && av_compare(aTHX_ (AV*)f, (AV*)s);
7 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;