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:
Meredith L. Patterson 2013-02-20 22:08:05 -05:00
parent 31665994f4
commit 5df9db015c

View file

@ -350,7 +350,11 @@ static void test_epsilon_p(void) {
bool validate_test_ab(HParseResult *p) { bool validate_test_ab(HParseResult *p) {
if (TT_SEQUENCE != p->ast->token_type) if (TT_SEQUENCE != p->ast->token_type)
return false; 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) { static void test_attr_bool(void) {