Branch Coverage

src/moment_fmt.c
Criterion Covered Total %
branch 76 98 77.5


line true false branch
90 6 21 if (h == 0)
102 114 0 switch (c) {
134 275 293 } while (v /= 10);
136 179 114 if (want == PAD_DEFAULT)
139 203 90 if (want == PAD_ZERO) c = '0';
140 52 38 else if (want == PAD_SPACE) c = ' ';
144 74 219 plen = (width > nlen) ? width - nlen : 0;
146 293 0 (void)SvGROW(dsv, SvCUR(dsv) + dlen + 1);
0 293 (void)SvGROW(dsv, SvCUR(dsv) + dlen + 1);
148 74 219 if (plen) {
164 0 28 if (len > 9) len = 9;
165 11 17 else if (len < 0) len = 0;
167 16 12 if (len == 0) {
168 8 8 if ((ns % 1000000) == 0) len = 3;
169 8 0 else if ((ns % 1000) == 0) len = 6;
194 0 3 if (v < 0) {
197 0 0 } while (v /= 10);
203 18 3 } while (v /= 10);
213 83 97 if (offset < 0)
217 86 94 if (extended)
228 2 93 if (offset == 0)
231 42 51 if (offset < 0)
271 737 634 while (s < e) {
273 737 0 if (p == NULL || p + 1 == e)
0 737 if (p == NULL || p + 1 == e)
276 0 737 if (p == e)
323 16 8 if (moment_nanosecond(mt)) {
426 86 0 if (s < e && *s == 'z') {
86 0 if (s < e && *s == 'z') {
432 38 0 if (s < e && supports_padding_flag(*s)) {
38 0 if (s < e && supports_padding_flag(*s)) {
438 38 0 if (s < e && supports_padding_flag(*s)) {
38 0 if (s < e && supports_padding_flag(*s)) {
445 61 0 if (s < e && (*s == 'f' || *s == 'N')) {
47 14 if (s < e && (*s == 'f' || *s == 'N')) {
9 38 if (s < e && (*s == 'f' || *s == 'N')) {
449 38 0 if (s < e && c == '0' && supports_padding_flag(*s)) {
38 0 if (s < e && c == '0' && supports_padding_flag(*s)) {
38 0 if (s < e && c == '0' && supports_padding_flag(*s)) {
481 3 4427 if (!reduced || sec || ns) {
1 2 if (!reduced || sec || ns) {
0 1 if (!reduced || sec || ns) {
483 3027 1402 if (ns) {
484 1482 1545 if ((ns % 1000000) == 0) sv_catpvf(dsv, ".%03d", ns / 1000000);
485 195 1350 else if ((ns % 1000) == 0) sv_catpvf(dsv, ".%06d", ns / 1000);
491 3365 1065 if (offset == 0)
494 211 854 if (offset < 0)
499 2 1063 if (reduced && (offset % 60) == 0)
1 1 if (reduced && (offset % 60) == 0)