57 lines
1.7 KiB
C
57 lines
1.7 KiB
C
#include <CUnit/Basic.h>
|
|
#include <CUnit/TestDB.h>
|
|
#include <gargoyle/test/gargoyle.h>
|
|
#include <gargoyle/test/scribe.h>
|
|
#include <gargoyle/test/sleuth.h>
|
|
#include <gargoyle/test/twine.h>
|
|
|
|
int main() {
|
|
if(CU_initialize_registry() != CUE_SUCCESS) {
|
|
return CU_get_error();
|
|
}
|
|
|
|
CU_TestInfo gargoyle_tests[] = {
|
|
{ "gargoyle_digest_argv", gargoyle_test_digest_argv },
|
|
{ "gargoyle_digest_envh", gargoyle_test_digest_envh },
|
|
CU_TEST_INFO_NULL
|
|
};
|
|
|
|
CU_TestInfo scribe_tests[] = {
|
|
{ "gargoyle_from_bool", scribe_test_from_bool },
|
|
{ "gargoyle_from_rope", scribe_test_from_rope },
|
|
CU_TEST_INFO_NULL
|
|
};
|
|
|
|
CU_TestInfo sleuth_tests[] = {
|
|
{ "gargoyle_find_brand", sleuth_test_find_brand },
|
|
{ "gargoyle_find_emblem", sleuth_test_find_emblem },
|
|
CU_TEST_INFO_NULL
|
|
};
|
|
|
|
CU_TestInfo twine_tests[] = {
|
|
{ "gargoyle_cmp", twine_test_cmp },
|
|
{ "gargoyle_cpy", twine_test_cpy },
|
|
{ "gargoyle_is_eql", twine_test_is_eql },
|
|
{ "gargoyle_is_sep", twine_test_is_sep },
|
|
CU_TEST_INFO_NULL
|
|
};
|
|
|
|
CU_SuiteInfo suites[] = {
|
|
// { "delusion", init_suite_delusion, clean_suite_delusion, NULL, NULL, delusion_tests },
|
|
{ "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 },
|
|
{ "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();
|
|
}
|