Branch Coverage

include/eshu_js.h
Criterion Covered Total %
branch 137 174 78.7


line true false branch
42 180 62 return c == '}' || c == ')' || c == ']';
180 0 return c == '}' || c == ')' || c == ']';
2 178 return c == '}' || c == ')' || c == ']';
54 1838 247 while (p < end) {
60 1177 63 if (c == '{' || c == '(' || c == '[') {
1097 80 if (c == '{' || c == '(' || c == '[') {
3 1094 if (c == '{' || c == '(' || c == '[') {
63 66 1028 } else if (c == '}') {
65 0 66 if (ctx->depth < 0) ctx->depth = 0;
67 4 62 if (ctx->tmpl_depth > 0 &&
68 3 1 ctx->depth == ctx->tmpl_brace_depth[ctx->tmpl_depth - 1]) {
75 948 80 } else if (c == ')' || c == ']') {
3 945 } else if (c == ')' || c == ']') {
77 0 83 if (ctx->depth < 0) ctx->depth = 0;
79 10 935 } else if (c == '"') {
81 6 929 } else if (c == '\'') {
83 9 920 } else if (c == '`') {
86 18 902 } else if (c == '/' && p + 1 < end && *(p + 1) == '/') {
18 0 } else if (c == '/' && p + 1 < end && *(p + 1) == '/') {
6 12 } else if (c == '/' && p + 1 < end && *(p + 1) == '/') {
89 12 902 } else if (c == '/' && p + 1 < end && *(p + 1) == '*') {
12 0 } else if (c == '/' && p + 1 < end && *(p + 1) == '*') {
5 7 } else if (c == '/' && p + 1 < end && *(p + 1) == '*') {
92 7 902 } else if (c == '/' && ctx->can_regex) {
6 1 } else if (c == '/' && ctx->can_regex) {
95 1 902 } else if (c == '/') {
98 528 374 } else if (isalnum((unsigned char)c) || c == '_' || c == '$') {
528 0 } else if (isalnum((unsigned char)c) || c == '_' || c == '$') {
0 528 } else if (isalnum((unsigned char)c) || c == '_' || c == '$') {
101 1328 0 while (p + 1 < end &&
102 954 374 (isalnum((unsigned char)*(p + 1)) ||
103 0 374 *(p + 1) == '_' || *(p + 1) == '$'))
0 374 *(p + 1) == '_' || *(p + 1) == '$'))
105 525 3 } else if (c == '+' || c == '-') {
1 524 } else if (c == '+' || c == '-') {
106 4 0 if (p + 1 < end && *(p + 1) == c) {
2 2 if (p + 1 < end && *(p + 1) == c) {
112 470 54 } else if (c == '=' || c == ',' || c == ';' || c == '!' ||
456 14 } else if (c == '=' || c == ',' || c == ';' || c == '!' ||
353 103 } else if (c == '=' || c == ',' || c == ';' || c == '!' ||
353 0 } else if (c == '=' || c == ',' || c == ';' || c == '!' ||
353 0 } else if (c == '=' || c == ',' || c == ';' || c == '!' ||
113 351 2 c == '~' || c == '<' || c == '>' || c == '&' ||
345 6 c == '~' || c == '<' || c == '>' || c == '&' ||
345 0 c == '~' || c == '<' || c == '>' || c == '&' ||
345 0 c == '~' || c == '<' || c == '>' || c == '&' ||
114 345 0 c == '|' || c == '^' || c == '?' || c == ':' ||
345 0 c == '|' || c == '^' || c == '?' || c == ':' ||
338 7 c == '|' || c == '^' || c == '?' || c == ':' ||
338 0 c == '|' || c == '^' || c == '?' || c == ':' ||
115 0 338 c == '%' || c == '*') {
122 5 172 if (c == '\\' && p + 1 < end) {
5 0 if (c == '\\' && p + 1 < end) {
124 10 162 } else if (c == '"') {
131 1 69 if (c == '\\' && p + 1 < end) {
1 0 if (c == '\\' && p + 1 < end) {
133 6 63 } else if (c == '\'') {
140 0 163 if (c == '\\' && p + 1 < end) {
0 0 if (c == '\\' && p + 1 < end) {
142 9 154 } else if (c == '`') {
145 3 151 } else if (c == '$' && p + 1 < end && *(p + 1) == '{') {
3 0 } else if (c == '$' && p + 1 < end && *(p + 1) == '{') {
3 0 } else if (c == '$' && p + 1 < end && *(p + 1) == '{') {
147 3 0 if (ctx->tmpl_depth < ESHU_JS_MAX_TMPL_DEPTH) {
158 2 36 if (c == '\\' && p + 1 < end) {
2 0 if (c == '\\' && p + 1 < end) {
160 1 35 } else if (c == '[') {
162 6 29 } else if (c == '/') {
164 10 0 while (p + 1 < end && isalpha((unsigned char)*(p + 1)))
4 6 while (p + 1 < end && isalpha((unsigned char)*(p + 1)))
172 0 7 if (c == '\\' && p + 1 < end) {
0 0 if (c == '\\' && p + 1 < end) {
174 1 6 } else if (c == ']') {
180 11 132 if (c == '*' && p + 1 < end && *(p + 1) == '/') {
10 1 if (c == '*' && p + 1 < end && *(p + 1) == '/') {
5 5 if (c == '*' && p + 1 < end && *(p + 1) == '/') {
205 3 253 if (content >= eol) {
214 3 250 if (ctx->state == ESHU_JS_TEMPLATE) {
216 3 0 if (*eol == '\n') eshu_buf_putc(out, '\n');
222 8 242 if (ctx->state == ESHU_COMMENT_BLOCK) {
231 242 0 if (ctx->state == ESHU_JS_REGEX ||
232 0 242 ctx->state == ESHU_JS_REGEX_CLASS) {
244 64 178 if (eshu_js_is_closing(*content)) {
246 0 64 if (indent_depth < 0) indent_depth = 0;
274 256 51 while (p < end) {
277 254 2 if (eshu_in_range(cfg, line_num)) {
289 256 0 if (*p == '\n') p++;