22#define TEST_VALID(NAME,TEXT) START_TEST (NAME) \
23{ ck_assert (valid_program(TEXT)); } \
29#define TEST_INVALID(NAME,TEXT) START_TEST (NAME) \
30{ ck_assert (invalid_program(TEXT)); } \
36#define TEST_VALID_MAIN(NAME,TEXT) START_TEST (NAME) \
37{ ck_assert (valid_program("def int main () { " TEXT " }")); } \
43#define TEST_INVALID_MAIN(NAME,TEXT) START_TEST (NAME) \
44{ ck_assert (invalid_program("def int main () { " TEXT " }")); } \
50#define TEST(NAME) tcase_add_test (tc, NAME)
Interface for Project 1 (Lexer)
Interface for Project 2 (Parser)
Interface for Project 3 (Analysis)
Linked list of AnalysisError* elements.
Definition symbol.h:217
bool valid_program(char *text)
Run lexer and parser on given text and verify that it returns an AST and does not throw an exception.
Definition testsuite.c:26
ErrorList * run_analysis(char *text)
Run lexer, parser, and analysis on given text.
Definition testsuite.c:10
bool invalid_program(char *text)
Run lexer and parser on given text and verify that it throws an exception.
Definition testsuite.c:32