Branch Coverage

Piece.xs
Criterion Covered Total %
branch 180 384 46.8


line true false branch
175 102 0 if (ptm->tm_yday >= 0 && mday <= 0 && month <= 0) {
1 101 if (ptm->tm_yday >= 0 && mday <= 0 && month <= 0) {
1 0 if (ptm->tm_yday >= 0 && mday <= 0 && month <= 0) {
183 49 53 if (month >= 2)
196 102 0 if ((unsigned) ptm->tm_sec <= 60) {
205 0 102 if (secs < 0) {
206 0 0 if (secs-(secs/SECS_PER_DAY*SECS_PER_DAY) < 0) {
217 0 102 else if (secs >= SECS_PER_DAY) {
247 3 99 if (!yearday && (odd_cent==4 || odd_year==4)) { /* catch Feb 29 */
2 1 if (!yearday && (odd_cent==4 || odd_year==4)) { /* catch Feb 29 */
0 2 if (!yearday && (odd_cent==4 || odd_year==4)) { /* catch Feb 29 */
256 50 51 if (month > 13) {
265 102 0 if (yearday) {
359 739 92 while (*ptr != 0) {
360 0 739 if (*buf == 0)
365 347 392 if (c != '%') {
366 156 191 if (isspace((unsigned char)c))
367 324 0 while (*buf != 0 && isspace((unsigned char)*buf))
168 156 while (*buf != 0 && isspace((unsigned char)*buf))
369 0 191 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 6 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 12 if (buf == 0)
468 0 0 if (buf == 0)
474 0 6 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 89 0 if (*buf == 0 || isspace((unsigned char)*buf))
89 0 if (*buf == 0 || isspace((unsigned char)*buf))
500 0 89 if (!isdigit((unsigned char)*buf))
504 178 89 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
178 0 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
178 0 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
510 46 43 if (c == 'M') {
511 0 46 if (i > 59)
515 0 43 if (i > 60)
520 61 28 if (*buf != 0 && isspace((unsigned char)*buf))
18 43 if (*buf != 0 && isspace((unsigned char)*buf))
521 18 0 while (*ptr != 0 && !isspace((unsigned char)*ptr))
0 18 while (*ptr != 0 && !isspace((unsigned char)*ptr))
537 0 53 if (!isdigit((unsigned char)*buf))
541 106 50 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
103 3 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
103 0 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
546 18 35 if (c == 'H' || c == 'k') {
0 18 if (c == 'H' || c == 'k') {
547 0 35 if (i > 23)
549 0 18 } else if (i > 12)
554 46 7 if (*buf != 0 && isspace((unsigned char)*buf))
0 46 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 12 6 if (strncasecmp(buf, Locale->am, len) == 0 ||
0 12 if (strncasecmp(buf, Locale->am, len) == 0 ||
568 0 6 if (tm->tm_hour > 12)
570 6 0 if (tm->tm_hour == 12)
577 0 12 if (strncasecmp(buf, Locale->pm, len) == 0 ||
0 0 if (strncasecmp(buf, Locale->pm, len) == 0 ||
579 0 12 if (tm->tm_hour > 12)
581 6 6 if (tm->tm_hour != 12)
591 112 0 for (i = 0; i < (int)asizeof(Locale->weekday); i++) {
592 28 84 if (c == 'A') {
594 6 22 if (strncasecmp(buf,
600 18 66 if (strncasecmp(buf,
606 0 24 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 58 if (!isdigit((unsigned char)*buf))
672 116 46 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
116 0 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
104 12 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
677 0 58 if (i > 31)
682 53 5 if (*buf != 0 && isspace((unsigned char)*buf))
53 0 if (*buf != 0 && isspace((unsigned char)*buf))
683 47 6 while (*ptr != 0 && !isspace((unsigned char)*ptr))
0 47 while (*ptr != 0 && !isspace((unsigned char)*ptr))
690 48 0 for (i = 0; i < (int)asizeof(Locale->month); i++) {
691 0 48 if (Oalternative) {
692 0 0 if (c == 'B') {
694 0 0 if (strncasecmp(buf,
700 12 36 if (c == 'B') {
702 6 6 if (strncasecmp(buf,
708 18 18 if (strncasecmp(buf,
715 0 24 if (i == (int)asizeof(Locale->month))
723 0 34 if (!isdigit((unsigned char)*buf))
727 68 34 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
68 0 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
68 0 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
732 34 0 if (i < 1 || i > 12)
0 34 if (i < 1 || i > 12)
737 34 0 if (*buf != 0 && isspace((unsigned char)*buf))
1 33 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 6 0 if (errno == ERANGE || (long)(t = n) != n) {
0 6 if (errno == ERANGE || (long)(t = n) != n) {
761 3 3 if(*got_GMT == 1)
780 61 0 if (*buf == 0 || isspace((unsigned char)*buf))
61 0 if (*buf == 0 || isspace((unsigned char)*buf))
783 0 61 if (!isdigit((unsigned char)*buf))
786 60 1 len = (c == 'Y') ? 4 : 2;
787 242 61 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
242 0 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
242 0 for (i = 0; len && *buf != 0 && isdigit((unsigned char)*buf); buf++) {
792 60 1 if (c == 'Y')
794 1 60 if (c == 'y' && i < 69)
1 0 if (c == 'y' && i < 69)
796 0 61 if (i < 0)
801 58 3 if (*buf != 0 && isspace((unsigned char)*buf))
24 34 if (*buf != 0 && isspace((unsigned char)*buf))
802 18 6 while (*ptr != 0 && !isspace((unsigned char)*ptr))
0 18 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 102 EXTEND(SP, 11);
916 1020 102 } while(SP <= endsp);
929 816 68 for (i = 0; i < 1 + (int) av_len( long_names ); i++) {
930 816 0 Locale->alt_month[i] = SvPV_nolen( (SV *) *av_fetch(alt_names, i, 0) );
931 816 0 Locale->month[i] = SvPV_nolen( (SV *) *av_fetch(long_names, i, 0) );
932 816 0 Locale->mon[i] = SvPV_nolen( (SV *) *av_fetch(short_names, i, 0) );
938 476 68 for (i = 0; i < 1 + (int) av_len( long_names ); i++) {
939 476 0 Locale->wday[i] = SvPV_nolen( (SV *) *av_fetch(short_names, i, 0) );
940 476 0 Locale->weekday[i] = SvPV_nolen( (SV *) *av_fetch(long_names, i, 0) );
943 68 0 Locale->am = SvPV_nolen( (SV *) *hv_fetch(locales, "am", 2, 0) );
944 68 0 Locale->pm = SvPV_nolen( (SV *) *hv_fetch(locales, "pm", 2, 0) );
945 68 0 Locale->AM = SvPV_nolen( (SV *) *hv_fetch(locales, "AM", 2, 0) );
946 68 0 Locale->PM = SvPV_nolen( (SV *) *hv_fetch(locales, "PM", 2, 0) );
966 116 146 if(islocal == 1)
986 262 0 if ((len > 0 && len < TP_BUF_SIZE) || (len == 0 && *fmt == '\0'))
0 262 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 68 0 if( SvTYPE(SvRV( localization )) == SVt_PVHV ){
1054 0 68 if (remainder == NULL) {
1057 0 68 if (*remainder != '\0') {
1091 3 3 if(ix) mytm = *gmtime(&sec);
1095 0 6 EXTEND(SP, 10);
1106 54 6 } while(SP <= endsp);
1126 7 1 for(i = 0; i < 7; ++i){
1137 12 1 for(i = 0; i < 12; ++i){
1160 1 0 if(tmp == NULL || !SvOK( (SV *) *tmp)){
0 1 if(tmp == NULL || !SvOK( (SV *) *tmp)){
0 0 if(tmp == NULL || !SvOK( (SV *) *tmp)){
0 0 if(tmp == NULL || !SvOK( (SV *) *tmp)){