diff options
author | Richard Hughes <richard@hughsie.com> | 2010-06-05 17:00:34 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2010-06-05 17:00:34 +0100 |
commit | 6ba86292e9e86601365c23a8f7f89f05a43ccd33 (patch) | |
tree | 5d5e16e197415a043ad21f6c98eafc84ea52aa5b /src/dummy | |
parent | 82a6a882d03c145625edbe23dade65bc14f85e73 (diff) | |
download | upower-6ba86292e9e86601365c23a8f7f89f05a43ccd33.tar.gz |
Port to GTest
Diffstat (limited to 'src/dummy')
-rw-r--r-- | src/dummy/Makefile.am | 2 | ||||
-rw-r--r-- | src/dummy/up-backend.c | 27 | ||||
-rw-r--r-- | src/dummy/up-native.c | 24 |
3 files changed, 1 insertions, 52 deletions
diff --git a/src/dummy/Makefile.am b/src/dummy/Makefile.am index 71c094a..053d295 100644 --- a/src/dummy/Makefile.am +++ b/src/dummy/Makefile.am @@ -19,7 +19,7 @@ libupshared_la_SOURCES = \ up-native.c \ $(BUILT_SOURCES) -if EGG_BUILD_TESTS +if UP_BUILD_TESTS noinst_LTLIBRARIES += libuptest.la libuptest_la_CFLAGS = -DEGG_TEST libuptest_la_SOURCES = $(libupshared_la_SOURCES) diff --git a/src/dummy/up-backend.c b/src/dummy/up-backend.c index 48b2b40..1eef5ca 100644 --- a/src/dummy/up-backend.c +++ b/src/dummy/up-backend.c @@ -291,30 +291,3 @@ up_backend_get_hibernate_command (UpBackend *backend) return "/bin/true"; } -/*************************************************************************** - *** MAKE CHECK TESTS *** - ***************************************************************************/ -#ifdef EGG_TEST -#include "egg-test.h" - -void -up_backend_test (gpointer user_data) -{ - EggTest *test = (EggTest *) user_data; - UpBackend *backend; - - if (!egg_test_start (test, "UpBackend")) - return; - - /************************************************************/ - egg_test_title (test, "get instance"); - backend = up_backend_new (); - egg_test_assert (test, backend != NULL); - - /* unref */ - g_object_unref (backend); - - egg_test_end (test); -} -#endif - diff --git a/src/dummy/up-native.c b/src/dummy/up-native.c index a0daefb..3392f83 100644 --- a/src/dummy/up-native.c +++ b/src/dummy/up-native.c @@ -38,27 +38,3 @@ up_native_get_native_path (GObject *object) return "/sys/dummy"; } -/*************************************************************************** - *** MAKE CHECK TESTS *** - ***************************************************************************/ -#ifdef EGG_TEST -#include "egg-test.h" - -void -up_native_test (gpointer user_data) -{ - EggTest *test = (EggTest *) user_data; - const gchar *path; - - if (!egg_test_start (test, "UpNative")) - return; - - /************************************************************/ - egg_test_title (test, "get instance"); - path = up_native_get_native_path (NULL); - egg_test_assert (test, (g_strcmp0 (path, "/sys/dummy") == 0)); - - egg_test_end (test); -} -#endif - |