20 #include <libfocunit.h> 23 #include <libfodbreposysconf.h> 25 #define AGENT_DIR "../../" 33 extern CU_TestInfo string_operations_testcases[];
34 extern CU_TestInfo file_operations_testcases[];
35 extern CU_TestInfo license_testcases[];
36 extern CU_TestInfo highlight_testcases[];
37 extern CU_TestInfo hash_testcases[];
38 extern CU_TestInfo diff_testcases[];
39 extern CU_TestInfo match_testcases[];
40 extern CU_TestInfo database_testcases[];
41 extern CU_TestInfo encoding_testcases[];
42 extern CU_TestInfo serialize_testcases[];
44 extern int license_setUpFunc();
45 extern int license_tearDownFunc();
47 extern int database_setUpFunc();
48 extern int database_tearDownFunc();
54 #if CU_VERSION_P == 213 56 {
"Testing process:", NULL, NULL, NULL, NULL, string_operations_testcases},
57 {
"Testing monk:", NULL, NULL, NULL, NULL, file_operations_testcases},
58 {
"Testing license:", NULL, NULL, (CU_SetUpFunc)license_setUpFunc, (CU_TearDownFunc)license_tearDownFunc, license_testcases},
59 {
"Testing highlighting:", NULL, NULL, NULL, NULL, highlight_testcases},
60 {
"Testing hash:", NULL, NULL, NULL, NULL, hash_testcases},
61 {
"Testing diff:", NULL, NULL, NULL, NULL, diff_testcases},
62 {
"Testing match:", NULL, NULL, NULL, NULL, match_testcases},
63 {
"Testing database:", NULL, NULL, (CU_SetUpFunc)database_setUpFunc, (CU_TearDownFunc)database_tearDownFunc, database_testcases},
64 {
"Testing encoding:", NULL, NULL, NULL, NULL, encoding_testcases},
65 {
"Testing serialize:", NULL, NULL, NULL, NULL, serialize_testcases},
70 {
"Testing process:", NULL, NULL, string_operations_testcases},
71 {
"Testing monk:", NULL, NULL, file_operations_testcases},
72 {
"Testing license:", license_setUpFunc, license_tearDownFunc, license_testcases},
73 {
"Testing highlighting:", NULL, NULL, highlight_testcases},
74 {
"Testing hash:", NULL, NULL, hash_testcases},
75 {
"Testing diff:", NULL, NULL, diff_testcases},
76 {
"Testing match:", NULL, NULL, match_testcases},
77 {
"Testing database:", database_setUpFunc, database_tearDownFunc, database_testcases},
78 {
"Testing encoding:", NULL, NULL, encoding_testcases},
79 {
"Testing serialize:", NULL, NULL, serialize_testcases},
88 int main(
int argc,
char** argv) {
89 dbManager = createTestEnvironment(AGENT_DIR,
"monk", 0);
90 const int returnValue = focunit_main(argc, argv,
"monk_agent_Tests", suites);
91 if (returnValue == 0) {
92 dropTestEnvironment(dbManager, AGENT_DIR,
"monk");
CU_SuiteInfo suites[]
all test suites for delagent
fo_dbManager * dbManager
fo_dbManager object
char * get_sysconfdir()
get sysconfig dir path just created by create_db_repo_sysconf()