Branch Coverage

keyval.h
Criterion Covered Total %
branch 65 88 73.8


line true false branch
42 1113 284 while (isize > 0) {
49 0 284 Newz(0,S->keyval,S->maxsize,keyval_t);
60 0 10 Newz(0, nkv, newmax, keyval_t);
61 136 10 for (i = 0; i < max; i++) {
63 105 31 if (key != 0) {
65 26 105 while (nkv[h].key > 0 && nkv[h].key != key)
26 0 while (nkv[h].key > 0 && nkv[h].key != key)
75 0 10 MPUassert(newsize == S->size, "keyval set size mismatch");
80 2282 2187 while (S.keyval[h].key > 0 && S.keyval[h].key != key)
352 1930 while (S.keyval[h].key > 0 && S.keyval[h].key != key)
82 1930 2187 return (S.keyval[h].key == key) ? h : -1;
87 1930 2187 return (i == -1) ? 0 : S.keyval[i].val;
92 2521 2298 while (S->keyval[h].key > 0 && S->keyval[h].key != kv.key)
910 1611 while (S->keyval[h].key > 0 && S->keyval[h].key != kv.key)
94 1611 2298 if (S->keyval[h].key == kv.key) {
99 10 2288 if (S->size++ > 0.65 * S->maxsize)
106 9768 245 for (j = 0; j < T.maxsize; j++)
107 1935 7833 if (T.keyval[j].key > 0)
129 119 25 while (isize > 0) {
136 0 25 Newz(0, L->keylist, L->maxsize, keylist_t);
142 0 25 for (i = 0; i < L->maxsize; i++)
143 0 0 if (L->keylist[i].size > 0)
151 0 0 Newz(0, nlist, newmax, keylist_t);
152 0 0 for (i = 0; i < max; i++) {
154 0 0 if (key != 0) {
156 0 0 while (nlist[h].key > 0 && nlist[h].key != key)
0 0 while (nlist[h].key > 0 && nlist[h].key != key)
166 0 0 MPUassert(newsize == L->size, "setlist size mismatch");
171 107 313 while (L.keylist[h].key > 0 && L.keylist[h].key != key)
12 95 while (L.keylist[h].key > 0 && L.keylist[h].key != key)
173 95 313 return (L.keylist[h].key == key) ? h : -1;
179 70 136 while (L->keylist[h].key > 0 && L->keylist[h].key != key)
14 56 while (L->keylist[h].key > 0 && L->keylist[h].key != key)
181 56 136 if (L->keylist[h].key == key) {
184 3 53 if (size + nvals > maxsize) {
186 0 3 Renew(L->keylist[h].vals, maxsize, UV);
190 140 56 for (j = 0; j < nvals; j++)
194 7 129 long maxsize = (nvals < 5) ? 12 : (nvals+1) * 2;
195 0 136 New(0, L->keylist[h].vals, maxsize, UV);
198 342 136 for (j = 0; j < nvals; j++)
202 0 136 if (L->size++ > 0.65 * L->maxsize)
213 313 95 if (i == -1) {
223 592 23 for (j = 0; j < T.maxsize; j++) {
224 95 497 if (T.keylist[j].key > 0) {