gargoyle/test/runner.c

43 lines
1.2 KiB
C
Raw Normal View History

2022-06-29 06:56:32 +00:00
#include <CUnit/Basic.h>
#include <CUnit/TestDB.h>
2022-06-29 21:19:34 +00:00
#include <gargoyle/test/sleuth.h>
2022-06-29 06:56:32 +00:00
#include <gargoyle/test/twine.h>
int main() {
if(CU_initialize_registry() != CUE_SUCCESS) {
return CU_get_error();
}
2022-06-29 21:19:34 +00:00
CU_TestInfo sleuth_tests[] = {
{ "gargoyle_find_brand", sleuth_test_find_brand },
{ "gargoyle_find_emblem", sleuth_test_find_emblem },
2022-06-29 21:19:34 +00:00
CU_TEST_INFO_NULL
};
2022-06-29 06:56:32 +00:00
CU_TestInfo twine_tests[] = {
2022-06-29 07:16:15 +00:00
{ "gargoyle_is_sep", twine_test_is_sep },
{ "gargoyle_is_eql", twine_test_is_eql },
2022-06-29 07:33:03 +00:00
{ "gargoyle_cmp", twine_test_cmp },
2022-06-29 08:04:00 +00:00
{ "gargoyle_cpy", twine_test_cpy },
2022-06-29 21:19:34 +00:00
CU_TEST_INFO_NULL
2022-06-29 06:56:32 +00:00
};
CU_SuiteInfo suites[] = {
2022-06-29 21:19:34 +00:00
// { "gargoyle", init_suite_gargoyle, clean_suite_gargoyle, NULL, NULL, gargoyle_tests },
// { "scribe", init_suite_scribe, clean_suite_scribe, NULL, NULL, scribe_tests },
{ "sleuth", init_suite_sleuth, clean_suite_sleuth, NULL, NULL, sleuth_tests },
2022-06-29 06:56:32 +00:00
{ "twine", init_suite_twine, clean_suite_twine, NULL, NULL, twine_tests },
CU_SUITE_INFO_NULL,
};
if(CU_register_suites(suites) != CUE_SUCCESS) {
CU_cleanup_registry();
return CU_get_error();
}
CU_basic_set_mode(CU_BRM_VERBOSE);
CU_basic_run_tests();
CU_cleanup_registry();
return CU_get_error();
}