Skip to content

Commit 3b35bfa

Browse files
committed
test: parse: Improve debug info on error
1 parent 5b5b7ac commit 3b35bfa

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

test/parse-auto.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -553,10 +553,14 @@ bool validate_rule_selector(css_rule_selector *s, exp_entry *e)
553553
printf("FAIL Bytecode differs\n"
554554
" Bytecode differs at %u\n ",
555555
(int) i);
556-
while (i < e->bcused) {
557-
printf("%.2x ",
558-
((uint8_t *) s->style->bytecode)[i]);
559-
i++;
556+
for (unsigned a = 0; a < e->bcused; a++) {
557+
if (a == i) {
558+
printf("[%.2x] ",
559+
((uint8_t *) s->style->bytecode)[a]);
560+
} else {
561+
printf("%.2x ",
562+
((uint8_t *) s->style->bytecode)[a]);
563+
}
560564
}
561565
printf("\n");
562566
return true;

0 commit comments

Comments
 (0)