Add initial unit tests
- Add µnit source and header files - Add test target to the build system - Implement a thorough lexer test suite - Implement a minimal AST test suite
This commit is contained in:
16
tests/main.c
Normal file
16
tests/main.c
Normal file
@ -0,0 +1,16 @@
|
||||
#include "munit.h"
|
||||
|
||||
extern MunitTest ast_tests[];
|
||||
extern MunitTest lexer_tests[];
|
||||
|
||||
int main(int argc, char *argv[MUNIT_ARRAY_PARAM(argc + 1)]) {
|
||||
MunitSuite suites[] = {
|
||||
{"/ast", ast_tests, nullptr, 1, MUNIT_SUITE_OPTION_NONE},
|
||||
{"/lexer", lexer_tests, nullptr, 1, MUNIT_SUITE_OPTION_NONE},
|
||||
{nullptr, nullptr, nullptr, 0, MUNIT_SUITE_OPTION_NONE},
|
||||
};
|
||||
|
||||
MunitSuite master_suite = {"/oas", nullptr, suites, 1, MUNIT_SUITE_OPTION_NONE};
|
||||
|
||||
return munit_suite_main(&master_suite, nullptr, argc, argv);
|
||||
}
|
Reference in New Issue
Block a user