Branch Coverage

ptable.h
Criterion Covered Total %
branch 60 80 75.0


line true false branch
99 0 159674 Newxz(tbl->tbl_ary, tbl->tbl_max + 1, PTABLE_ENTRY_t*);
115 915298 3184496 for (; tblent; tblent = tblent->next) {
116 479148 436150 if (tblent->key == key)
126 479127 1592231 return tblent ? tblent->value : NULL;
139 0 4554 Renew(ary, newsize, PTABLE_ENTRY_t*);
140 0 4554 Zero(&ary[oldsize], newsize - oldsize, PTABLE_ENTRY_t*);
144 111360 4554 for (i = 0; i < oldsize; i++, ary++) {
146 39459 71901 if (!*ary)
149 113731 71901 for (entp = ary, ent = *ary; ent; ent = *entp) {
150 57490 56241 if ((newsize & PTABLE_HASH(ent->key)) != i) {
169 0 1592243 if (tblent) {
180 178938 1413305 if (tblent->next && (tbl->tbl_items > tbl->tbl_max))
4554 174384 if (tblent->next && (tbl->tbl_items > tbl->tbl_max))
193 2717819 0 if (tbl && tbl->tbl_items) {
771190 1946629 if (tbl && tbl->tbl_items) {
200 1592228 14957912 while (entry) {
212 14186722 771190 } while (riter--);
221 4 0 if (tbl && tbl->tbl_items) {
4 0 if (tbl && tbl->tbl_items) {
228 4 32 while (entry) {
231 4 0 if (oentry->value)
242 28 4 } while (riter--);
256 19 0 if (!tbl || !tbl->tbl_items) {
4 15 if (!tbl || !tbl->tbl_items) {
263 11 4 for (; tblent; tblent_prev = tblent, tblent = tblent->next) {
264 11 0 if (tblent->key == key) {
265 0 11 if (tblent_prev != NULL) {
305 0 18 if (flags & PTABLE_FLAG_AUTOCLEAN)
318 0 18 if (tbl->tbl_items == 0) {
324 0 18 PTABLE_ITER_NEXT_ELEM(iter, tbl);
0 0 PTABLE_ITER_NEXT_ELEM(iter, tbl);
0 92 PTABLE_ITER_NEXT_ELEM(iter, tbl);
74 18 PTABLE_ITER_NEXT_ELEM(iter, tbl);
342 22 18 PTABLE_ITER_NEXT_ELEM(iter, tbl);
2 20 PTABLE_ITER_NEXT_ELEM(iter, tbl);
36 52 PTABLE_ITER_NEXT_ELEM(iter, tbl);
50 2 PTABLE_ITER_NEXT_ELEM(iter, tbl);
352 0 18 if (iter->table->cur_iter == iter)
374 0 159674 if (!tbl)
378 0 159674 if (tbl->cur_iter) {