Branch Coverage

src/xs/Array.cc
Criterion Covered Total %
branch 38 52 73.0


line true false branch
7 13 0 ret.resize(size);
10 2 11 if (type == COPY) {
11 3 2 for (size_t i = 0; i < size; ++i) {
12 3 0 if (*content) {
13 3 0 SV* val = *dst++ = newSV(0);
14 3 0 sv_setsv_flags(val, *content++, SV_DO_COW_SVSETSV|SV_NOSTEAL);
21 19 11 for (size_t i = 0; i < size; ++i) *dst++ = SvREFCNT_inc(*content++);
29 15 8 for (size_t i = 0; i < l.size(); ++i) svs[i] = (*from++).get();
30 8 0 auto tmp = create(l.size(), svs, type);
35 1 17 if (!sv) throw std::logic_error("store: empty object");
1 0 if (!sv) throw std::logic_error("store: empty object");
36 12 5 SvREFCNT_inc_simple_void(val.get());
38 3 14 if (key >= _cap()) av_extend((AV*)sv, key);
3 0 if (key >= _cap()) av_extend((AV*)sv, key);
44 17 0 if (_size() <= key) _size(key+1);
8 9 if (_size() <= key) _size(key+1);
45 9 0 else SvREFCNT_dec(old);
54 13 5 for (size_t i = 0; i < addsize; ++i) *dst++ = SvREFCNT_inc((from++)->get());
63 2 1 for (size_t i = 0; i < addsize; ++i) *dst++ = SvREFCNT_inc(*from++);
77 3 1 for (size_t i = 0; i < addsize; ++i) *dst++ = SvREFCNT_inc((from++)->get());
85 2 1 for (size_t i = 0; i < addsize; ++i) *dst++ = SvREFCNT_inc(*from++);
95 0 1 if (max && sz > max) sz = max;
0 0 if (max && sz > max) sz = max;
96 1 0 EXTEND(sp, (I32)sz);
0 1 EXTEND(sp, (I32)sz);
98 3 1 for (decltype(sz) i = 0; i < sz; ++i) *++sp = sv_2mortal(SvREFCNT_inc(list[i]));