libgitk_core.c

Go to the documentation of this file.
00001 
00013 #define GITK_TESTS_CORE_C
00014 
00015 #include "libgitk.h"
00016 
00017 
00021 static void test_setup(void) {
00022   gitk_log("-- beg -----------------------");
00023 }
00024 
00028 static void test_teardown(void) {
00029   gitk_log("-- end -----------------------\n\n");
00030 }
00031 
00032 
00036 START_TEST(test_gitk_init) {
00037   gitk_init(&test_argc,&test_argvptr,PACKAGE,LOCALEDIR);
00038   gitk_done();
00039 }
00040 END_TEST
00041 
00045 START_TEST(test_gitk_init_cmdargs1) {
00046   gint l_test_argc=3;
00047   gchar *l_arg0="check_libgitk";
00048   gchar *l_arg1="--gitk-renderer=dummy";
00049   gchar *l_arg2="--gitk-style";
00050   gchar *l_test_argv[3];
00051   gchar **l_test_argvptr;
00052 
00053   l_test_argv[0]=l_arg0;
00054   l_test_argv[1]=l_arg1;
00055   l_test_argv[2]=l_arg2;
00056   l_test_argvptr=l_test_argv;
00057 
00058   gitk_init(&l_test_argc,&l_test_argvptr,PACKAGE,LOCALEDIR);
00059   gitk_done();
00060 }
00061 END_TEST
00062 
00066 START_TEST(test_gitk_init_cmdargs2) {
00067   gint l_test_argc=3;
00068   gchar *l_arg0="check_libgitk";
00069   gchar *l_arg1="--gitk-renderer=dummy";
00070   gchar *l_arg2="--gitk-style=";
00071   gchar *l_test_argv[3];
00072   gchar **l_test_argvptr;
00073 
00074   l_test_argv[0]=l_arg0;
00075   l_test_argv[1]=l_arg1;
00076   l_test_argv[2]=l_arg2;
00077   l_test_argvptr=l_test_argv;
00078 
00079   gitk_init(&l_test_argc,&l_test_argvptr,PACKAGE,LOCALEDIR);
00080   gitk_done();
00081 }
00082 END_TEST
00083 
00084 
00088 TCase *libgitk_core_tcase(void) {
00089   TCase *tc = tcase_create("Core");
00090 
00091   tcase_add_test(tc,test_gitk_init);
00092   tcase_add_test(tc,test_gitk_init_cmdargs1);
00093   tcase_add_test(tc,test_gitk_init_cmdargs2);
00094   tcase_add_unchecked_fixture(tc, test_setup, test_teardown);
00095   return(tc);
00096 }

Generated on Thu Oct 28 10:59:16 2004 for gitk by doxygen 1.3.6