Branch Coverage

/usr/local/lib/perl5/site_perl/5.26.1/x86_64-linux/XS/Framework.x/i/xs/Hash.h
Criterion Covered Total %
branch 17 48 35.4


line true false branch
16 2 0 ret.reserve(cap);
26 0 0 Hash (SV* sv, bool policy = INCREMENT) : Sv(sv, policy) { _validate(); }
32 60 0 Hash (Sv&& oth) : Sv(std::move(oth)) { _validate(); }
68 0 0 if (!sv) return Scalar();
69 0 0 SV** ref = hv_fetch((HV*)sv, key.data(), key.length(), 0);
71 0 0 if (ref) ret.set(*ref);
0 0 if (ref) ret.set(*ref);
86 2 0 void store (const panda::string_view& key, const Sv& v, U32 hash = 0) { store(key, Scalar(v), hash); }
102 13 38 if (!sv) return false;
118 0 7 if (HvUSEDKEYS(hv)) operator++();
7 0 if (HvUSEDKEYS(hv)) operator++();
124 7 7 if (cur) {
126 0 7 if (cur) return *this;
128 63 7 while (!cur && arr != end) cur = *arr++;
56 7 while (!cur && arr != end) cur = *arr++;
56 14 while (!cur && arr != end) cur = *arr++;
167 7 0 iterator begin () { return sv ? iterator((HV*)sv) : iterator(); }
174 0 0 if (!sv) return;
175 0 0 if (SvTYPE(sv) == SVt_PVHV) return;
176 0 0 if (SvROK(sv)) { // reference to hash?
178 0 0 if (SvTYPE(val) == SVt_PVHV) {
179 0 0 Sv::operator=(val);
183 0 0 if (is_undef()) return reset();
185 0 0 throw std::invalid_argument("SV is not a Hash or Hash reference");