Branch Coverage

src/dt_parse_iso.c
Criterion Covered Total %
branch 98 198 49.4


line true false branch
34 5751 109 for(; i < len; i++) {
36 1470 4281 if (c > 9)
73 0 102 if (ndigits < 1)
75 0 102 if (ndigits > 9)
77 102 0 if (fp)
117 9 0 if (n < len && (p[n] == '.' || p[n] == ',')) {
6 3 if (n < len && (p[n] == '.' || p[n] == ',')) {
0 6 if (n < len && (p[n] == '.' || p[n] == ',')) {
119 0 3 if (!r)
125 17 0 if (h > 23 || m > 59 || s > 59) {
17 0 if (h > 23 || m > 59 || s > 59) {
0 17 if (h > 23 || m > 59 || s > 59) {
126 0 0 if (!(h == 24 && m == 0 && s == 0 && f == 0))
0 0 if (!(h == 24 && m == 0 && s == 0 && f == 0))
0 0 if (!(h == 24 && m == 0 && s == 0 && f == 0))
0 0 if (!(h == 24 && m == 0 && s == 0 && f == 0))
130 17 0 if (sp)
132 17 0 if (fp)
149 0 15 if (len < 1)
168 0 10 if (len < 3)
187 10 0 if (h > 23 || m > 59)
0 10 if (h > 23 || m > 59)
196 13 0 if (op)
216 1 186 if (count_digits(p, 0, len) != 2)
223 186 0 if (len < 3 || p[2] != ':')
185 1 if (len < 3 || p[2] != ':')
226 0 185 if (count_digits(p, 3, len) != 2)
232 185 0 if (len < 6 || p[5] != ':')
144 41 if (len < 6 || p[5] != ':')
235 0 144 if (count_digits(p, 6, len) != 2)
242 144 0 if (n < len && (p[n] == '.' || p[n] == ',')) {
45 99 if (n < len && (p[n] == '.' || p[n] == ',')) {
0 45 if (n < len && (p[n] == '.' || p[n] == ',')) {
244 0 99 if (!r)
250 186 0 if (h > 23 || m > 59 || s > 59) {
186 0 if (h > 23 || m > 59 || s > 59) {
0 186 if (h > 23 || m > 59 || s > 59) {
251 0 0 if (!(h == 24 && m == 0 && s == 0 && f == 0))
0 0 if (!(h == 24 && m == 0 && s == 0 && f == 0))
0 0 if (!(h == 24 && m == 0 && s == 0 && f == 0))
0 0 if (!(h == 24 && m == 0 && s == 0 && f == 0))
255 186 0 if (sp)
257 186 0 if (fp)
274 0 122 if (len < 1)
293 48 0 if (len < 3 || count_digits(p, 1, len) != 2)
0 48 if (len < 3 || count_digits(p, 1, len) != 2)
300 42 6 if (len < 4 || p[3] != ':')
42 0 if (len < 4 || p[3] != ':')
303 0 42 if (count_digits(p, 4, len) != 2)
310 48 0 if (h > 23 || m > 59)
0 48 if (h > 23 || m > 59)
319 122 0 if (op)
350 0 82 if (len < 1)
361 9 0 if (len < 3 || p[1] != 'M' || p[2] != 'T')
9 0 if (len < 3 || p[1] != 'M' || p[2] != 'T')
0 9 if (len < 3 || p[1] != 'M' || p[2] != 'T')
363 8 1 if (len > 3 && (p[3] == '+' || p[3] == '-')) {
4 4 if (len > 3 && (p[3] == '+' || p[3] == '-')) {
4 0 if (len > 3 && (p[3] == '+' || p[3] == '-')) {
364 0 8 if (!(n = dt_parse_iso_zone_lenient(str + 3, len - 3, op)))
372 9 0 if (len < 3 || p[1] != 'T' || p[2] != 'C')
9 0 if (len < 3 || p[1] != 'T' || p[2] != 'C')
0 9 if (len < 3 || p[1] != 'T' || p[2] != 'C')
374 8 1 if (len > 3 && (p[3] == '+' || p[3] == '-')) {
4 4 if (len > 3 && (p[3] == '+' || p[3] == '-')) {
4 0 if (len > 3 && (p[3] == '+' || p[3] == '-')) {
375 0 8 if (!(n = dt_parse_iso_zone_lenient(str + 3, len - 3, op)))
392 0 52 if (len < 2)
415 26 14 if (len < n + 1 || p[n] != ':')
26 0 if (len < n + 1 || p[n] != ':')
418 0 26 if (count_digits(p, ++n, len) != 2)
425 52 0 if (h > 23 || m > 59)
0 52 if (h > 23 || m > 59)
430 66 0 if (op)
468 0 252 if (len < 8)
477 0 0 if (n != 3)
485 0 4 if (n != 3)
499 238 0 if (p[7] != '-' || count_digits(p, 8, len) != 2)
0 238 if (p[7] != '-' || count_digits(p, 8, len) != 2)
513 0 5 if (len < 10)
520 0 0 if (n != 1 || p[7] != '-' || count_digits(p, 8, len) != 2)
0 0 if (n != 1 || p[7] != '-' || count_digits(p, 8, len) != 2)
0 0 if (n != 1 || p[7] != '-' || count_digits(p, 8, len) != 2)
528 5 0 if (n != 2 || p[8] != '-' || count_digits(p, 9, len) != 1)
5 0 if (n != 2 || p[8] != '-' || count_digits(p, 9, len) != 1)
0 5 if (n != 2 || p[8] != '-' || count_digits(p, 9, len) != 1)
539 0 9 if (!dt_valid_yd(y, d))
545 0 248 if (!dt_valid_ymd(y, x, d))
552 0 0 if (!dt_valid_yqd(y, x, d))
559 0 9 if (!dt_valid_ywd(y, x, d))
565 0 266 if (y < 1)
568 266 0 if (dtp)
588 0 66 if (len < 2)
591 0 66 if (str[0] == 'T')
596 66 0 if (len < 2 || str[2] == ':')
64 2 if (len < 2 || str[2] == ':')
601 0 66 if (!n)
615 0 0 if (len < 3 || str[3] == ':')
0 0 if (len < 3 || str[3] == ':')