open_test.c
00001 #include <stdio.h>
00002 #include <stdlib.h>
00003 #include <string.h>
00004 #include "open_suite.h"
00005 #include "CUnit.h"
00006 #include "TestDB.h"
00007 #include "Basic.h"
00008
00009
00010
00011
00012
00013
00014 int main(int argc, char* argv[])
00015 {
00016 CU_BasicRunMode mode = CU_BRM_VERBOSE;
00017 unsigned int ret;
00018
00019 if (CU_initialize_registry())
00020 printf("\nInitialization of Test Registry failed.");
00021
00022 add_suite_open();
00023
00024 CU_basic_set_mode(mode);
00025 printf("\nTests completed with return value %d.\n", CU_basic_run_tests());
00026 printf("\nTests failed %d.\n", ret = CU_get_number_of_tests_failed() );
00027
00028 CU_cleanup_registry();
00029
00030 if ( ret == 0 )
00031 return EXIT_SUCCESS;
00032 else
00033 return EXIT_FAILURE;
00034
00035 }