00001
00018 #define GITK_TESTS_LIBGITK_C
00019
00020 #include "libgitk.h"
00021
00025 guint test_argc=2;
00029 gchar *arg0="check_libgitk";
00033 gchar *arg1="--gitk-renderer=dummy";
00037 gchar *test_argv[2];
00041 gchar **test_argvptr;
00042
00044 gchar errormsg[ERROR_STR_LENGTH];
00045
00049 Suite *libgitk_suite (void) {
00050 Suite *s=suite_create("LibGitk");
00051
00052 suite_add_tcase(s,libgitk_core_tcase());
00053 suite_add_tcase(s,libgitk_dialog_tcase());
00054 suite_add_tcase(s,libgitk_template_tcase());
00055 suite_add_tcase(s,libgitk_valid_tcase());
00056 suite_add_tcase(s,libgitk_widget_tcase());
00057 return(s);
00058 }
00059
00062 int main (void) {
00063 guint logger_id;
00064 int nf;
00065 Suite *s=libgitk_suite();
00066 SRunner *sr=srunner_create(s);
00067
00068 test_argv[0]=arg0;
00069 test_argv[1]=arg1;
00070 test_argvptr=test_argv;
00071
00072 logger_id=g_log_set_handler(G_LOG_DOMAIN,G_LOG_LEVEL_DEBUG|G_LOG_LEVEL_MESSAGE|G_LOG_LEVEL_WARNING|G_LOG_LEVEL_ERROR, gitk_log_handler, NULL);
00073 gitk_log("-- beg -----------------------");
00074
00075
00076
00077
00078 srunner_run_all(sr,CK_NORMAL);
00079 nf=srunner_ntests_failed(sr);
00080 srunner_free(sr);
00081 suite_free(s);
00082
00083 gitk_log("-- end -----------------------\n\n");
00084 g_log_remove_handler(G_LOG_DOMAIN,logger_id);
00085 return(nf==0) ? EXIT_SUCCESS : EXIT_FAILURE;
00086 }