Branch Coverage

Shared.xs
Criterion Covered Total %
branch 83 164 50.6


line true false branch
36 2 3 const char *p = SvOK(path) ? SvPV_nolen(path) : NULL;
38 0 5 if (!h) croak("Data::BitSet::Shared->new: %s", errbuf);
52 0 1 if (!h) croak("Data::BitSet::Shared->new_memfd: %s", errbuf);
65 0 1 if (!h) croak("Data::BitSet::Shared->new_from_fd: %s", errbuf);
74 0 7 if (!SvROK(self)) return;
76 0 7 if (!h) return;
85 264 0 EXTRACT_BS(self);
0 264 EXTRACT_BS(self);
0 264 EXTRACT_BS(self);
87 1 263 CHECK_BIT(h, bit);
88 255 8 RETVAL = bs_test(h, bit);
97 19 0 EXTRACT_BS(self);
0 19 EXTRACT_BS(self);
0 19 EXTRACT_BS(self);
99 1 18 CHECK_BIT(h, bit);
100 0 18 RETVAL = bs_set(h, bit);
109 2 0 EXTRACT_BS(self);
0 2 EXTRACT_BS(self);
0 2 EXTRACT_BS(self);
111 0 2 CHECK_BIT(h, bit);
112 0 2 RETVAL = bs_clear(h, bit);
121 2 0 EXTRACT_BS(self);
0 2 EXTRACT_BS(self);
0 2 EXTRACT_BS(self);
123 0 2 CHECK_BIT(h, bit);
124 0 2 RETVAL = bs_toggle(h, bit);
132 10 0 EXTRACT_BS(self);
0 10 EXTRACT_BS(self);
0 10 EXTRACT_BS(self);
142 2 0 EXTRACT_BS(self);
0 2 EXTRACT_BS(self);
0 2 EXTRACT_BS(self);
144 0 2 RETVAL = (UV)h->hdr->capacity;
152 1 0 EXTRACT_BS(self);
0 1 EXTRACT_BS(self);
0 1 EXTRACT_BS(self);
154 0 1 RETVAL = bs_any(h);
162 1 0 EXTRACT_BS(self);
0 1 EXTRACT_BS(self);
0 1 EXTRACT_BS(self);
164 0 1 RETVAL = bs_none(h);
172 3 0 EXTRACT_BS(self);
0 3 EXTRACT_BS(self);
0 3 EXTRACT_BS(self);
180 4 0 EXTRACT_BS(self);
0 4 EXTRACT_BS(self);
0 4 EXTRACT_BS(self);
188 3 0 EXTRACT_BS(self);
0 3 EXTRACT_BS(self);
0 3 EXTRACT_BS(self);
191 2 1 RETVAL = (r >= 0) ? newSViv((IV)r) : &PL_sv_undef;
199 3 0 EXTRACT_BS(self);
0 3 EXTRACT_BS(self);
0 3 EXTRACT_BS(self);
202 1 2 RETVAL = (r >= 0) ? newSViv((IV)r) : &PL_sv_undef;
210 1 0 EXTRACT_BS(self);
0 1 EXTRACT_BS(self);
0 1 EXTRACT_BS(self);
212 1 0 RETVAL = h->path ? newSVpv(h->path, 0) : &PL_sv_undef;
220 1 0 EXTRACT_BS(self);
0 1 EXTRACT_BS(self);
0 1 EXTRACT_BS(self);
222 0 1 RETVAL = h->backing_fd;
230 0 0 EXTRACT_BS(self);
0 0 EXTRACT_BS(self);
0 0 EXTRACT_BS(self);
239 0 0 if (sv_isobject(self_or_class)) {
241 0 0 if (!h) croak("destroyed object");
244 0 0 if (items < 2) croak("Usage: ...->unlink($path)");
247 0 0 if (!p) croak("cannot unlink anonymous or memfd object");
248 0 0 if (unlink(p) != 0) croak("unlink(%s): %s", p, strerror(errno));
254 1 0 EXTRACT_BS(self);
0 1 EXTRACT_BS(self);
0 1 EXTRACT_BS(self);
271 2 0 EXTRACT_BS(self);
0 2 EXTRACT_BS(self);
0 2 EXTRACT_BS(self);
278 8 2 for (uint32_t w = 0; w < nw && idx < cap; w++) {
8 0 for (uint32_t w = 0; w < nw && idx < cap; w++) {
280 512 8 for (int b = 0; b < 64 && idx < cap; b++, idx++)
512 0 for (int b = 0; b < 64 && idx < cap; b++, idx++)
281 6 506 buf[idx] = (word >> b) & 1 ? '1' : '0';