Branch Coverage

strtoint64.h
Criterion Covered Total %
branch 47 56 83.9


line true false branch
59 0 897 } while (isspace(c));
60 206 691 if (c == '-') {
63 4 202 if (!sign) overflow(aTHX_ "negative sign found when parsing unsigned number");
66 0 691 if (c == '+')
69 545 350 if ((base == 0 || base == 16) &&
103 442 if ((base == 0 || base == 16) &&
41 412 if ((base == 0 || base == 16) &&
70 0 41 c == '0' && (*s == 'x' || *s == 'X')) {
0 0 c == '0' && (*s == 'x' || *s == 'X')) {
75 309 586 if (base == 0)
76 0 309 base = c == '0' ? 8 : 10;
78 22 873 if (mdoo) upper_mul_limit = UINT64_MAX / base;
81 17168 3509 if (isdigit(c))
83 2513 996 else if (isalpha(c))
84 2201 312 c -= isupper(c) ? 'A' - 10 : 'a' - 10;
85 105 891 else if ((c == '_') && between)
105 0 else if ((c == '_') && between)
89 0 19681 if (c >= base)
91 383 19298 if (mdoo) {
92 6 377 if (acc > upper_mul_limit) overflow(aTHX_ (sign ? out_of_bounds_error_s : out_of_bounds_error_u));
4 2 if (acc > upper_mul_limit) overflow(aTHX_ (sign ? out_of_bounds_error_s : out_of_bounds_error_u));
94 3 377 if (UINT64_MAX - acc < c) overflow(aTHX_ (sign ? out_of_bounds_error_s : out_of_bounds_error_u));
0 3 if (UINT64_MAX - acc < c) overflow(aTHX_ (sign ? out_of_bounds_error_s : out_of_bounds_error_u));
102 18 873 if ( mdoo && sign &&
12 6 if ( mdoo && sign &&
4 8 if ( mdoo && sign &&
103 7 5 ( acc > (neg ? (~(uint64_t)INT64_MIN + 1) : INT64_MAX) ) ) overflow(aTHX_ out_of_bounds_error_s);
105 202 687 return (neg ? ~acc + 1 : acc);