Main Page | Modules | Data Structures | File List | Data Fields | Related Pages

dbus-glib-tool.c

00001 /* -*- mode: C; c-file-style: "gnu" -*- */
00002 /* dbus-compiler-main.c main() for GLib stubs/skels generator
00003  *
00004  * Copyright (C) 2003  Red Hat, Inc.
00005  *
00006  * Licensed under the Academic Free License version 2.0
00007  *
00008  * This program is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2 of the License, or
00011  * (at your option) any later version.
00012  *
00013  * This program is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program; if not, write to the Free Software
00020  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021  *
00022  */
00023 
00024 #include "dbus-gidl.h"
00025 #include <locale.h>
00026 
00027 #ifdef DBUS_BUILD_TESTS
00028 static void run_all_tests (const char *test_data_dir);
00029 #endif
00030 
00031 int
00032 main (int argc, char **argv)
00033 {
00034   setlocale(LC_ALL, "");
00035 
00036   return 0;
00037 }
00038 
00039 #ifdef DBUS_BUILD_TESTS
00040 static void
00041 test_die (const char *failure)
00042 {
00043   fprintf (stderr, "Unit test failed: %s\n", failure);
00044   exit (1);
00045 }
00046 
00047 static void
00048 run_all_tests (const char *test_data_dir)
00049 {
00050   if (test_data_dir == NULL)
00051     test_data_dir = _dbus_getenv ("DBUS_TEST_DATA");
00052 
00053   if (test_data_dir != NULL)
00054     printf ("Test data in %s\n", test_data_dir);
00055   else
00056     printf ("No test data!\n");
00057 
00058   printf ("%s: running gtool tests\n", "dbus-glib-tool");
00059   if (!_dbus_gtool_test (test_data_dir))
00060     test_die ("gtool");
00061 
00062   printf ("%s: completed successfully\n", "dbus-glib-test");
00063 }
00064 
00070 dbus_bool_t
00071 _dbus_gtool_test (const char *test_data_dir)
00072 {
00073 
00074   return TRUE;
00075 }
00076 
00077 #endif /* DBUS_BUILD_TESTS */

Generated on Sun Mar 21 03:52:04 2004 for D-BUS by doxygen 1.3.6-20040222