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 46 42 if (nanosecond <= 0 && precision < 0)
39 7 if (nanosecond <= 0 && precision < 0)
89 3 46 if (p < 0) {
90 3 0 if ((nanosecond % 1000000) == 0) p = 3;
91 0 0 else if ((nanosecond % 1000) == 0) p = 6;
95 4 45 if (p == 0)
99 189 45 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 20 if (offset < 0)
154 39 21 if (offset == 0)
244 694 124 while (*s) {
246 1030 8 while (*s && *s != '%')
344 686 while (*s && *s != '%')
249 306 388 if (s > p)
252 8 686 if (!*s)
276 5 0 if (*s == 'd') {
323 4 0 if (*s == 'z') {
350 0 132 if (!tstr_format_is_known(fmt))
354 0 132 if (!info->spec)