Branch Coverage

include/litavis_cascade.h
Criterion Covered Total %
branch 53 58 91.3


line true false branch
20 24 132 if (a->prop_count != b->prop_count) return 0;
21 205 90 for (i = 0; i < a->prop_count; i++) {
22 15 190 if (strcmp(a->props[i].key, b->props[i].key) != 0) return 0;
23 27 163 if (strcmp(a->props[i].value, b->props[i].value) != 0) return 0;
34 19 10 for (i = 0; i < target->prop_count; i++) {
35 17 14 for (j = 0; j < between->prop_count; j++) {
36 5 12 if (strcmp(target->props[i].key, between->props[j].key) == 0) {
50 15 80 for (k = i + 1; k < j; k++) {
51 5 10 if (litavis_has_prop_conflict(&ast->rules[i], &ast->rules[k])) {
64 0 85 if (!combined) LITAVIS_FATAL("out of memory");
82 820 350 for (i = 0; i < ast->count; i++) {
83 26350 820 for (j = i + 1; j < ast->count; ) {
84 0 26350 if (strcmp(ast->rules[i].selector, ast->rules[j].selector) == 0) {
105 274 168 while (i < ast->count) {
109 6 268 if (ast->rules[i].is_at_rule) {
115 145 188 for (j = i + 1; j < ast->count; j++) {
116 4 141 if (ast->rules[j].is_at_rule) continue;
118 85 56 if (litavis_props_equal(&ast->rules[i], &ast->rules[j])) {
119 80 5 if (litavis_safe_to_merge(ast, i, j)) {
134 188 80 if (!merged) i++;
146 15 5 while (i < ast->count) {
149 0 15 if (ast->rules[i].is_at_rule) {
155 15 10 for (j = i + 1; j < ast->count; j++) {
156 0 15 if (ast->rules[j].is_at_rule) continue;
158 5 10 if (litavis_props_equal(&ast->rules[i], &ast->rules[j])) {
171 10 5 if (!merged) i++;
185 2 173 if (strategy == LITAVIS_DEDUPE_OFF) return;
191 168 5 if (strategy == LITAVIS_DEDUPE_CONSERVATIVE) {
193 5 0 } else if (strategy == LITAVIS_DEDUPE_AGGRESSIVE) {