Branch Coverage

lib/Net/IDN/Punycode.xs
Criterion Covered Total %
branch 51 58 87.9


line true false branch
51 12475 10142 delta /= first ? DAMP : 2;
54 18478 22617 for(k=0; delta > ((BASE-TMIN) * TMAX)/2; k += BASE)
65 22 124668 if(*current + add <= *end)
69 22 0 *start = SvGROW(sv, (len + add + 15) & ~15);
22 0 *start = SvGROW(sv, (len + add + 15) & ~15);
105 16330 1735 while(in_p < in_e) {
106 7282 9048 if( isBASE(*in_p) ) {
115 455 1280 if(h) {
125 31390 4993 for(in_p = skip_p = in_s; in_p < in_e;) {
129 4254 27136 if(c >= n && c < m) {
134 24390 7000 if(c < n)
138 3258 1735 if(m == UV_MAX)
149 13433 3258 for(in_p = skip_p; in_p < in_e;) {
153 7904 5529 if(c < n) {
155 3363 2166 } else if( c == n ) {
160 6793 3363 if(q < t) break;
212 77401 8413 for(in_p = in_s; in_p < in_e; in_p++) {
214 0 77401 if(!isBASE(c)) croak("non-base character in input for decode_punycode");
215 3096 74305 if(c == DELIM) skip_p = in_p;
220 2061 6352 if(skip_p) {
230 19260 8407 for(in_p = skip_p; in_p < in_e; i++) {
235 6 70579 if(!(in_p < in_e)) croak("incomplete encoded code point in decode_punycode");
237 0 70579 if(dc < 0) croak("invalid digit in input for decode_punycode");
241 51325 19254 if(c < t) break;
250 19254 0 u8 = UNISKIP(n); /* how many bytes we need */
19254 0 u8 = UNISKIP(n); /* how many bytes we need */
253 17194 19254 for(skip_p = re_s; j > 0; j--) /* find position in UTF-8 */
257 7789 11465 if(skip_p < re_p) /* move succeeding chars */
263 8407 0 if(!first) SvUTF8_on(RETVAL); /* UTF-8 chars have been inserted */