Branch Coverage

lib/Text/Wrap/Smart/XS.xs
Criterion Covered Total %
branch 65 72 90.2


line true false branch
43 90 4 while (p > text && IS_WHITESPACE (*(p - 1)))
10 80 while (p > text && IS_WHITESPACE (*(p - 1)))
2 78 while (p > text && IS_WHITESPACE (*(p - 1)))
2 76 while (p > text && IS_WHITESPACE (*(p - 1)))
2 74 while (p > text && IS_WHITESPACE (*(p - 1)))
49 8 84 while (IS_WHITESPACE (*p))
2 82 while (IS_WHITESPACE (*p))
2 80 while (IS_WHITESPACE (*p))
2 78 while (IS_WHITESPACE (*p))
57 6 72 if (strpbrk (text, "\f\n\r\t"))
65 12 6 while ((ws = strpbrk (src, "\f\n\r\t")))
79 3 9 if (*ws == '\r' && *p == '\n') /* CRLF */
0 3 if (*ws == '\r' && *p == '\n') /* CRLF */
82 12 0 if (p < eot)
87 6 0 if (src < eot)
105 17005 68 while (*p)
777 10 while (*p)
107 2496 14516 while (*p == ' ' && *(p + 1) == ' ')
7 2489 while (*p == ' ' && *(p + 1) == ' ')
116 668 while (*p == ' ' && *(p + 1) == ' ')
7 109 while (*p == ' ' && *(p + 1) == ' ')
119 34 40 if (length % wrap_at != 0)
140 2 8 if (length == 0)
148 18 8 for (offset = 0; offset < length && *t; offset += average)
18 0 for (offset = 0; offset < length && *t; offset += average)
153 0 18 SAVE_STRING (str, size, t);
171 2 66 if (length == 0)
179 581 66 while (*t)
187 2555 66 for (s = t; *s;)
190 2489 66 if (ptr)
203 2426 63 next_space = n ? n - p : 0;
205 2300 189 if (next_space > remaining && spaces >= 1)
207 1974 326 else if (remaining <= 0)
216 581 0 if (!size)
219 0 581 SAVE_STRING (str, size, t);
221 515 66 if (*t)