Branch Coverage

Piece.xs
Criterion Covered Total %
branch 129 384 33.5


line true false branch
175 27 0 if (ptm->tm_yday >= 0 && mday <= 0 && month <= 0) {
1 26 if (ptm->tm_yday >= 0 && mday <= 0 && month <= 0) {
1 0 if (ptm->tm_yday >= 0 && mday <= 0 && month <= 0) {
183 14 13 if (month >= 2)
196 27 0 if ((unsigned) ptm->tm_sec <= 60) {
205 0 27 if (secs < 0) {
206 0 0 if (secs-(secs/SECS_PER_DAY*SECS_PER_DAY) < 0) {
217 0 27 else if (secs >= SECS_PER_DAY) {
247 2 25 if (!yearday && (odd_cent==4 || odd_year==4)) { /* catch Feb 29 */
1 1 if (!yearday && (odd_cent==4 || odd_year==4)) { /* catch Feb 29 */
0 1 if (!yearday && (odd_cent==4 || odd_year==4)) { /* catch Feb 29 */
256 10 16 if (month > 13) {
265 27 0 if (yearday) {
359 115 20 while (*ptr != 0) {
360 0 115 if (*buf == 0)
365 47 68 if (c != '%') {
366 12 35 if (isspace((unsigned char)c))
367 24 0 while (*buf != 0 && isspace((unsigned char)*buf))
12 12 while (*buf != 0 && isspace((unsigned char)*buf))
369 0 35 else if (c != *buf++)
381 0 0 if (*buf++ != '%')
387 0 0 if (buf == 0)
392 0 0 if (!isdigit((unsigned char)*buf))
397 0 0 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
0 0 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
0 0 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
402 0 0 if (i < 19)
412 0 0 if (buf == 0)
418 0 0 if (buf == 0)
423 0 0 if (Ealternative || Oalternative)
0 0 if (Ealternative || Oalternative)
429 0 0 if (Ealternative || Oalternative)
0 0 if (Ealternative || Oalternative)
436 0 0 if (buf == 0)
442 0 0 if (buf == 0)
448 0 0 if (buf == 0)
454 0 0 if (!isspace((unsigned char)*buf))
456 0 0 while (isspace((unsigned char)*buf))
462 0 0 if (buf == 0)
468 0 0 if (buf == 0)
474 0 0 if (buf == 0)
479 0 1 if (!isdigit((unsigned char)*buf))
483 3 1 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
3 0 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
3 0 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
488 1 0 if (i < 1 || i > 366)
0 1 if (i < 1 || i > 366)
497 5 0 if (*buf == 0 || isspace((unsigned char)*buf))
5 0 if (*buf == 0 || isspace((unsigned char)*buf))
500 0 5 if (!isdigit((unsigned char)*buf))
504 10 5 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
10 0 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
10 0 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
510 4 1 if (c == 'M') {
511 0 4 if (i > 59)
515 0 1 if (i > 60)
520 1 4 if (*buf != 0 && isspace((unsigned char)*buf))
0 1 if (*buf != 0 && isspace((unsigned char)*buf))
521 0 0 while (*ptr != 0 && !isspace((unsigned char)*ptr))
0 0 while (*ptr != 0 && !isspace((unsigned char)*ptr))
537 0 11 if (!isdigit((unsigned char)*buf))
541 22 8 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
19 3 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
19 0 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
546 0 11 if (c == 'H' || c == 'k') {
0 0 if (c == 'H' || c == 'k') {
547 0 11 if (i > 23)
549 0 0 } else if (i > 12)
554 4 7 if (*buf != 0 && isspace((unsigned char)*buf))
0 4 if (*buf != 0 && isspace((unsigned char)*buf))
555 0 0 while (*ptr != 0 && !isspace((unsigned char)*ptr))
0 0 while (*ptr != 0 && !isspace((unsigned char)*ptr))
566 0 0 if (strncasecmp(buf, Locale->am, len) == 0 ||
0 0 if (strncasecmp(buf, Locale->am, len) == 0 ||
568 0 0 if (tm->tm_hour > 12)
570 0 0 if (tm->tm_hour == 12)
577 0 0 if (strncasecmp(buf, Locale->pm, len) == 0 ||
0 0 if (strncasecmp(buf, Locale->pm, len) == 0 ||
579 0 0 if (tm->tm_hour > 12)
581 0 0 if (tm->tm_hour != 12)
591 0 0 for (i = 0; i < (int)asizeof(Locale->weekday); i++) {
592 0 0 if (c == 'A') {
594 0 0 if (strncasecmp(buf,
600 0 0 if (strncasecmp(buf,
606 0 0 if (i == (int)asizeof(Locale->weekday))
622 0 0 if (!isdigit((unsigned char)*buf))
626 0 0 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
0 0 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
0 0 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
631 0 0 if (i > 53)
634 0 0 if (*buf != 0 && isspace((unsigned char)*buf))
0 0 if (*buf != 0 && isspace((unsigned char)*buf))
635 0 0 while (*ptr != 0 && !isspace((unsigned char)*ptr))
0 0 while (*ptr != 0 && !isspace((unsigned char)*ptr))
641 0 0 if (!isdigit((unsigned char)*buf))
645 0 0 if (i > 6 + (c == 'u'))
0 0 if (i > 6 + (c == 'u'))
647 0 0 if (i == 7)
653 0 0 if (*buf != 0 && isspace((unsigned char)*buf))
0 0 if (*buf != 0 && isspace((unsigned char)*buf))
654 0 0 while (*ptr != 0 && !isspace((unsigned char)*ptr))
0 0 while (*ptr != 0 && !isspace((unsigned char)*ptr))
668 0 16 if (!isdigit((unsigned char)*buf))
672 32 16 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
32 0 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
32 0 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
677 0 16 if (i > 31)
682 11 5 if (*buf != 0 && isspace((unsigned char)*buf))
11 0 if (*buf != 0 && isspace((unsigned char)*buf))
683 11 0 while (*ptr != 0 && !isspace((unsigned char)*ptr))
0 11 while (*ptr != 0 && !isspace((unsigned char)*ptr))
690 0 0 for (i = 0; i < (int)asizeof(Locale->month); i++) {
691 0 0 if (Oalternative) {
692 0 0 if (c == 'B') {
694 0 0 if (strncasecmp(buf,
700 0 0 if (c == 'B') {
702 0 0 if (strncasecmp(buf,
708 0 0 if (strncasecmp(buf,
715 0 0 if (i == (int)asizeof(Locale->month))
723 0 16 if (!isdigit((unsigned char)*buf))
727 32 16 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
32 0 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
32 0 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
732 16 0 if (i < 1 || i > 12)
0 16 if (i < 1 || i > 12)
737 16 0 if (*buf != 0 && isspace((unsigned char)*buf))
1 15 if (*buf != 0 && isspace((unsigned char)*buf))
738 1 0 while (*ptr != 0 && !isspace((unsigned char)*ptr))
0 1 while (*ptr != 0 && !isspace((unsigned char)*ptr))
753 0 0 if (errno == ERANGE || (long)(t = n) != n) {
0 0 if (errno == ERANGE || (long)(t = n) != n) {
761 0 0 if(*got_GMT == 1)
780 19 0 if (*buf == 0 || isspace((unsigned char)*buf))
19 0 if (*buf == 0 || isspace((unsigned char)*buf))
783 0 19 if (!isdigit((unsigned char)*buf))
786 18 1 len = (c == 'Y') ? 4 : 2;
787 74 19 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
74 0 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
74 0 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
792 18 1 if (c == 'Y')
794 1 18 if (c == 'y' && i < 69)
1 0 if (c == 'y' && i < 69)
796 0 19 if (i < 0)
801 16 3 if (*buf != 0 && isspace((unsigned char)*buf))
0 16 if (*buf != 0 && isspace((unsigned char)*buf))
802 0 0 while (*ptr != 0 && !isspace((unsigned char)*ptr))
0 0 while (*ptr != 0 && !isspace((unsigned char)*ptr))
811 0 0 for (cp = buf; *cp && isupper((unsigned char)*cp); ++cp)
0 0 for (cp = buf; *cp && isupper((unsigned char)*cp); ++cp)
813 0 0 if (cp - buf) {
815 0 0 if (!zonestr) {
822 0 0 if (0 == strcmp(zonestr, "GMT")) {
826 0 0 if (!*got_GMT) return 0;
836 0 0 if (*buf != '+') {
837 0 0 if (*buf == '-')
845 0 0 for (len = 4; len > 0; len--) {
846 0 0 if (isdigit((int)*buf)) {
902 0 27 EXTEND(SP, 11);
916 270 27 } while(SP <= endsp);
929 240 20 for (i = 0; i < 1 + (int) av_len( long_names ); i++) {
930 240 0 Locale->alt_month[i] = SvPV_nolen( (SV *) *av_fetch(alt_names, i, 0) );
931 240 0 Locale->month[i] = SvPV_nolen( (SV *) *av_fetch(long_names, i, 0) );
932 240 0 Locale->mon[i] = SvPV_nolen( (SV *) *av_fetch(short_names, i, 0) );
938 140 20 for (i = 0; i < 1 + (int) av_len( long_names ); i++) {
939 140 0 Locale->wday[i] = SvPV_nolen( (SV *) *av_fetch(short_names, i, 0) );
940 140 0 Locale->weekday[i] = SvPV_nolen( (SV *) *av_fetch(long_names, i, 0) );
943 20 0 Locale->am = SvPV_nolen( (SV *) *hv_fetch(locales, "am", 2, 0) );
944 20 0 Locale->pm = SvPV_nolen( (SV *) *hv_fetch(locales, "pm", 2, 0) );
945 20 0 Locale->AM = SvPV_nolen( (SV *) *hv_fetch(locales, "AM", 2, 0) );
946 20 0 Locale->PM = SvPV_nolen( (SV *) *hv_fetch(locales, "PM", 2, 0) );
966 5 35 if(islocal == 1)
986 40 0 if ((len > 0 && len < TP_BUF_SIZE) || (len == 0 && *fmt == '\0'))
0 40 if ((len > 0 && len < TP_BUF_SIZE) || (len == 0 && *fmt == '\0'))
0 0 if ((len > 0 && len < TP_BUF_SIZE) || (len == 0 && *fmt == '\0'))
0 0 if ((len > 0 && len < TP_BUF_SIZE) || (len == 0 && *fmt == '\0'))
996 0 0 while (buf) {
998 0 0 if (buflen > 0 && buflen < bufsize)
0 0 if (buflen > 0 && buflen < bufsize)
1001 0 0 if (bufsize > 100*fmtlen) {
1009 0 0 if (buf) {
1043 20 0 if( SvTYPE(SvRV( localization )) == SVt_PVHV ){
1054 0 20 if (remainder == NULL) {
1057 0 20 if (*remainder != '\0') {
1091 3 3 if(ix) mytm = *gmtime(&sec);
1095 0 6 EXTEND(SP, 10);
1106 54 6 } while(SP <= endsp);
1126 0 0 for(i = 0; i < 7; ++i){
1137 0 0 for(i = 0; i < 12; ++i){
1160 0 0 if(tmp == NULL || !SvOK( (SV *) *tmp)){
0 0 if(tmp == NULL || !SvOK( (SV *) *tmp)){
0 0 if(tmp == NULL || !SvOK( (SV *) *tmp)){
0 0 if(tmp == NULL || !SvOK( (SV *) *tmp)){