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 18 34 52.9


line true false branch
26 3 0 Hash (SV* sv, bool policy = INCREMENT) : Sv(sv, policy) { _validate(); }
112 0 0 void clear () { if (sv) hv_clear((HV*)sv); }
118 0 3 if (HvUSEDKEYS(hv)) operator++();
3 0 if (HvUSEDKEYS(hv)) operator++();
124 7 3 if (cur) {
126 0 7 if (cur) return *this;
128 27 7 while (!cur && arr != end) cur = *arr++;
24 3 while (!cur && arr != end) cur = *arr++;
24 10 while (!cur && arr != end) cur = *arr++;
167 3 0 iterator begin () { return sv ? iterator((HV*)sv) : iterator(); }
174 0 3 if (!sv) return;
175 0 3 if (SvTYPE(sv) == SVt_PVHV) return;
176 3 0 if (SvROK(sv)) { // reference to hash?
178 3 0 if (SvTYPE(val) == SVt_PVHV) {
179 3 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");