Branch Coverage

tstr_time2str.c
Criterion Covered Total %
branch 39 46 84.7


line true false branch
65 10 6 buf[0] = (v >= 10) ? '0' + v / 10 : ' ';
71 3 2 if (v >= 10) {
85 37 41 if (nanosecond <= 0 && precision < 0)
30 7 if (nanosecond <= 0 && precision < 0)
89 3 45 if (p < 0) {
90 3 0 if ((nanosecond % 1000000) == 0) p = 3;
91 0 0 else if ((nanosecond % 1000) == 0) p = 6;
95 4 44 if (p == 0)
99 186 44 for (j = 0; j < p; j++)
111 37 20 if (offset == 0 && zulu) {
23 14 if (offset == 0 && zulu) {
116 9 25 if (offset < 0)
136 5 10 if (offset < 0)
154 39 11 if (offset == 0)
244 654 114 while (*s) {
246 980 8 while (*s && *s != '%')
334 646 while (*s && *s != '%')
249 296 358 if (s > p)
252 8 646 if (!*s)
276 5 0 if (*s == 'd') {
323 4 0 if (*s == 'z') {
350 0 122 if (!tstr_format_is_known(fmt))
354 0 122 if (!info->spec)