From: Guillaume Desmottes Date: Tue, 27 Oct 2009 15:51:11 +0000 (+0000) Subject: move test_init/test_deinit to test-helper.c X-Git-Url: https://git.0d.be/?p=empathy.git;a=commitdiff_plain;h=2a974fc78e833d232a6203d5a807b0ee5efb396a move test_init/test_deinit to test-helper.c --- diff --git a/tests/Makefile.am b/tests/Makefile.am index 21ee99bf..bc7407aa 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -26,7 +26,8 @@ LDADD = \ TEST_PROGS = \ empathy-utils-test -empathy_utils_test_SOURCES = empathy-utils-test.c +empathy_utils_test_SOURCES = empathy-utils-test.c \ + test-helper.c test-helper.h check_PROGRAMS = check-main $(TEST_PROGS) diff --git a/tests/empathy-utils-test.c b/tests/empathy-utils-test.c index 415526ff..896793aa 100644 --- a/tests/empathy-utils-test.c +++ b/tests/empathy-utils-test.c @@ -2,23 +2,8 @@ #include #include -#include - #include - -static void -test_init (int argc, - char **argv) -{ - g_test_init (&argc, &argv, NULL); - g_type_init (); -} - -static void -test_deinit (void) -{ - ; -} +#include "test-helper.h" static void test_substring (void) diff --git a/tests/test-helper.c b/tests/test-helper.c new file mode 100644 index 00000000..37fad86e --- /dev/null +++ b/tests/test-helper.c @@ -0,0 +1,19 @@ +#include +#include +#include + +#include "test-helper.h" + +void +test_init (int argc, + char **argv) +{ + g_test_init (&argc, &argv, NULL); + g_type_init (); +} + +void +test_deinit (void) +{ + ; +} diff --git a/tests/test-helper.h b/tests/test-helper.h new file mode 100644 index 00000000..a2a69b76 --- /dev/null +++ b/tests/test-helper.h @@ -0,0 +1,9 @@ +#ifndef __TEST_HELPER_H__ +#define __TEST_HELPER_H__ + +void test_init (int argc, + char **argv); + +void test_deinit (void); + +#endif