diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2009-10-27 23:51:11 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2009-11-03 20:25:01 +0800 |
commit | 2a974fc78e833d232a6203d5a807b0ee5efb396a (patch) | |
tree | 9e056909eebb08bc4cec1f2431c1ece8301e53cc | |
parent | f053694701a9cb6c35fa0250c1a0b3374bd54395 (diff) | |
download | gsoc2013-empathy-2a974fc78e833d232a6203d5a807b0ee5efb396a.tar gsoc2013-empathy-2a974fc78e833d232a6203d5a807b0ee5efb396a.tar.gz gsoc2013-empathy-2a974fc78e833d232a6203d5a807b0ee5efb396a.tar.bz2 gsoc2013-empathy-2a974fc78e833d232a6203d5a807b0ee5efb396a.tar.lz gsoc2013-empathy-2a974fc78e833d232a6203d5a807b0ee5efb396a.tar.xz gsoc2013-empathy-2a974fc78e833d232a6203d5a807b0ee5efb396a.tar.zst gsoc2013-empathy-2a974fc78e833d232a6203d5a807b0ee5efb396a.zip |
move test_init/test_deinit to test-helper.c
-rw-r--r-- | tests/Makefile.am | 3 | ||||
-rw-r--r-- | tests/empathy-utils-test.c | 17 | ||||
-rw-r--r-- | tests/test-helper.c | 19 | ||||
-rw-r--r-- | tests/test-helper.h | 9 |
4 files changed, 31 insertions, 17 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 21ee99bf8..bc7407aac 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 415526ff3..896793aa0 100644 --- a/tests/empathy-utils-test.c +++ b/tests/empathy-utils-test.c @@ -2,23 +2,8 @@ #include <stdio.h> #include <string.h> -#include <glib.h> - #include <libempathy/empathy-utils.h> - -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 000000000..37fad86eb --- /dev/null +++ b/tests/test-helper.c @@ -0,0 +1,19 @@ +#include <stdlib.h> +#include <glib.h> +#include <glib-object.h> + +#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 000000000..a2a69b764 --- /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 |