23#define ERROR_RETURN_CODE (-9999)
28#define TEST_PROGRAM(NAME,RVAL,TEXT) START_TEST (NAME) \
29{ ck_assert_int_eq (run_program(TEXT), RVAL); } \
35#define TEST_MAIN(NAME,RVAL,TEXT) START_TEST (NAME) \
36{ ck_assert_int_eq (run_main(TEXT), RVAL); } \
42#define TEST_EXPRESSION(NAME,RVAL,TEXT) START_TEST (NAME) \
43{ ck_assert_int_eq (run_expression(TEXT), RVAL); } \
49#define TEST_BOOL_EXPRESSION(NAME,RVAL,TEXT) START_TEST (NAME) \
50{ ck_assert_int_eq (run_bool_expression(TEXT), RVAL); } \
56#define TEST(NAME) tcase_add_test (tc, NAME)
Interface for Project 1 (Lexer)
Interface for Project 2 (Parser)
Interface for Project 3 (Analysis)
Interface for Project 4 (Code Generation)
int run_expression(char *text)
Run lexer, parser, analysis, and code generation on given integer expression.
Definition testsuite.c:40
int run_bool_expression(char *text)
Run lexer, parser, analysis, and code generation on given boolean expression.
Definition testsuite.c:47
int run_main(char *text)
Run lexer, parser, analysis, and code generation on given 'main' function.
Definition testsuite.c:33
int run_program(char *text)
Run lexer, parser, analysis, and code generation on given program.
Definition testsuite.c:10