Refactor for separate tests for packrat and LL(k).

This commit is contained in:
Meredith L. Patterson 2013-05-22 23:50:48 -07:00
parent 2c8d76d7ea
commit 10584ba22a
2 changed files with 248 additions and 209 deletions

View file

@ -83,8 +83,8 @@
} \
} while(0)
#define g_check_parse_failed(parser, input, inp_len) do { \
int skip = h_compile((HParser *)(parser), PB_LLk, NULL); \
#define g_check_parse_failed(parser, backend, input, inp_len) do { \
int skip = h_compile((HParser *)(parser), (HParserBackend)backend, NULL); \
if(skip != 0) { \
g_test_message("Backend not applicable, skipping test"); \
break; \
@ -96,9 +96,9 @@
} \
} while(0)
#define g_check_parse_ok(parser, input, inp_len, result) do { \
int skip = h_compile((HParser *)(parser), PB_LLk, NULL); \
if(skip) { \
#define g_check_parse_ok(parser, backend, input, inp_len, result) do { \
int skip = h_compile((HParser *)(parser), (HParserBackend) backend, NULL); \
if(skip) { \
g_test_message("Backend not applicable, skipping test"); \
break; \
} \