Branch Coverage

uri.c
Criterion Covered Total %
branch 54 68 79.4


line true false branch
28 0 12 if (length < 0) {
33 2 10 buffer_ensure_unused(tgt, length);
2 0 buffer_ensure_unused(tgt, length);
2 2 buffer_ensure_unused(tgt, length);
2 0 buffer_ensure_unused(tgt, length);
35 144 12 while (s < (src->pos + length)) {
37 48 0 isxdigit(src->data[s+1]) &&
52 12 0 buffer_terminate(tgt);
62 0 31 if (length < 0) {
67 8 23 buffer_ensure_unused(tgt, 3 * length);
8 0 buffer_ensure_unused(tgt, 3 * length);
14 8 buffer_ensure_unused(tgt, 3 * length);
8 0 buffer_ensure_unused(tgt, 3 * length);
69 494 31 while (s < (src->pos + length)) {
75 313 181 if (!v) {
92 31 0 buffer_terminate(tgt);
104 0 104 if (length < 0) {
109 14 90 buffer_ensure_unused(tgt, 3 * length);
14 0 buffer_ensure_unused(tgt, 3 * length);
28 14 buffer_ensure_unused(tgt, 3 * length);
14 0 buffer_ensure_unused(tgt, 3 * length);
113 1318 104 while (s < (src->pos + length)) {
119 1088 230 if (!v[0]) {
136 104 0 buffer_terminate(tgt);
149 44 60 if (escape->data[beg] == '^') {
156 26624 104 for (pos = 0; pos < 256; ++pos) {
157 11264 15360 SET_ENCODE_VALUE(matrix, pos, flag);
161 1512 104 for (pos = beg; pos < escape->size; ++pos) {
163 152 1360 if (escape->data[pos] != '-' ||
152 0 if (escape->data[pos] != '-' ||
164 56 96 (pos == beg || pos == (escape->size - 1))) {
167 120 1296 SET_ENCODE_VALUE(matrix, p, flag);
171 1760 96 for (p = escape->data[pos-1] + 1; p <= escape->data[pos+1]; ++p) {
172 108 1652 SET_ENCODE_VALUE(matrix, p, flag);