h_ch's return type is uint, not bytes; fixed validate_test_ab accordingly, even though it worked before with the wrong union member name (probably because token is the first thing in the struct). Oh C, stay classy.
This commit is contained in:
parent
31665994f4
commit
5df9db015c
1 changed files with 5 additions and 1 deletions
|
|
@ -350,7 +350,11 @@ static void test_epsilon_p(void) {
|
|||
bool validate_test_ab(HParseResult *p) {
|
||||
if (TT_SEQUENCE != p->ast->token_type)
|
||||
return false;
|
||||
return (p->ast->seq->elements[0]->bytes.token == p->ast->seq->elements[1]->bytes.token);
|
||||
if (TT_UINT != p->ast->seq->elements[0]->token_type)
|
||||
return false;
|
||||
if (TT_UINT != p->ast->seq->elements[1]->token_type)
|
||||
return false;
|
||||
return (p->ast->seq->elements[0]->uint == p->ast->seq->elements[1]->uint);
|
||||
}
|
||||
|
||||
static void test_attr_bool(void) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue