Branch Coverage

lib/Net/IDN/Punycode.xs
Criterion Covered Total %
branch 0 94 0.0


line true false branch
47 0 0 delta /= first ? DAMP : 2;
0 0 delta /= first ? DAMP : 2;
50 0 0 for(k=0; delta > ((BASE-TMIN) * TMAX)/2; k += BASE)
0 0 for(k=0; delta > ((BASE-TMIN) * TMAX)/2; k += BASE)
61 0 0 if(*current + add <= *end)
65 0 0 *start = SvGROW(sv, (len + add + 15) & ~15);
0 0 *start = SvGROW(sv, (len + add + 15) & ~15);
87 0 0 in_s = in_p = SvPVutf8(input, len);
91 0 0 if(length_guess < 64) length_guess = 64; /* optimise for maximum length of domain names */
96 0 0 re_s = re_p = SvPV_nolen(RETVAL);
101 0 0 while(in_p < in_e) {
102 0 0 if( isBASE(*in_p) ) {
111 0 0 if(h) {
121 0 0 for(in_p = skip_p = in_s; in_p < in_e;) {
122 0 0 c = utf8_to_uvchr_buf((U8*)in_p, (U8*)in_e, &u8);
125 0 0 if(c >= n && c < m) {
130 0 0 if(c < n)
134 0 0 if(m == UV_MAX)
145 0 0 for(in_p = skip_p; in_p < in_e;) {
146 0 0 c = utf8_to_uvchr_buf((U8*)in_p, (U8*)in_e, &u8);
149 0 0 if(c < n) {
151 0 0 } else if( c == n ) {
155 0 0 t = TMIN_MAX(k - bias);
156 0 0 if(q < t) break;
161 0 0 if(q > BASE) croak("input exceeds punycode limit");
196 0 0 in_s = in_p = SvPV_nolen(input);
200 0 0 if(length_guess < 256) length_guess = 256;
204 0 0 re_s = re_p = SvPV_nolen(RETVAL);
208 0 0 for(in_p = in_s; in_p < in_e; in_p++) {
210 0 0 if(!isBASE(c)) croak("non-base character in input for decode_punycode");
211 0 0 if(c == DELIM) skip_p = in_p;
216 0 0 if(skip_p) {
226 0 0 for(in_p = skip_p; in_p < in_e; i++) {
231 0 0 if(!(in_p < in_e)) croak("incomplete encoded code point in decode_punycode");
233 0 0 if(dc < 0) croak("invalid digit in input for decode_punycode");
236 0 0 t = TMIN_MAX(k - bias);
237 0 0 if(c < t) break;
246 0 0 u8 = UNISKIP(n); /* how many bytes we need */
0 0 u8 = UNISKIP(n); /* how many bytes we need */
0 0 u8 = UNISKIP(n); /* how many bytes we need */
0 0 u8 = UNISKIP(n); /* how many bytes we need */
0 0 u8 = UNISKIP(n); /* how many bytes we need */
0 0 u8 = UNISKIP(n); /* how many bytes we need */
0 0 u8 = UNISKIP(n); /* how many bytes we need */
249 0 0 for(skip_p = re_s; j > 0; j--) /* find position in UTF-8 */
253 0 0 if(skip_p < re_p) /* move succeeding chars */
259 0 0 if(!first) SvUTF8_on(RETVAL); /* UTF-8 chars have been inserted */