diff options
| author | Michael Biebl <biebl@debian.org> | 2014-07-06 02:16:10 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2014-07-06 02:16:10 +0200 |
| commit | 33491bc4279481db8ae47213e34a6d695a0e8830 (patch) | |
| tree | 097d2b0fdff3fae6885381ae5e57a182cd8cbbba /libnm-glib/tests/test-remote-settings-client.c | |
| parent | 59c3714a494c3b3765657c0551ad82842d98a7d2 (diff) | |
Imported Upstream version 0.9.10.0 upstream/0.9.10.0
Diffstat (limited to 'libnm-glib/tests/test-remote-settings-client.c')
| -rw-r--r-- | libnm-glib/tests/test-remote-settings-client.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/libnm-glib/tests/test-remote-settings-client.c b/libnm-glib/tests/test-remote-settings-client.c index ad62075d..e3ef7f22 100644 --- a/libnm-glib/tests/test-remote-settings-client.c +++ b/libnm-glib/tests/test-remote-settings-client.c @@ -342,17 +342,9 @@ test_remove_connection (void) /*******************************************************************/ -#if GLIB_CHECK_VERSION(2,25,12) -typedef GTestFixtureFunc TCFunc; -#else -typedef void (*TCFunc)(void); -#endif - -#define TESTCASE(t, d) g_test_create_case (#t, 0, d, NULL, (TCFunc) t, NULL) - -int main (int argc, char **argv) +int +main (int argc, char **argv) { - GTestSuite *suite; char *service_argv[3] = { NULL, NULL, NULL }; int ret; GError *error = NULL; @@ -360,7 +352,9 @@ int main (int argc, char **argv) g_assert (argc == 3); +#if !GLIB_CHECK_VERSION (2, 35, 0) g_type_init (); +#endif g_test_init (&argc, &argv, NULL); @@ -390,12 +384,10 @@ int main (int argc, char **argv) settings = nm_remote_settings_new (bus); test_assert (settings != NULL); - suite = g_test_get_root (); - - g_test_suite_add (suite, TESTCASE (test_add_connection, NULL)); - g_test_suite_add (suite, TESTCASE (test_make_invisible, NULL)); - g_test_suite_add (suite, TESTCASE (test_make_visible, NULL)); - g_test_suite_add (suite, TESTCASE (test_remove_connection, NULL)); + g_test_add_func ("/remote_settings/add_connection", test_add_connection); + g_test_add_func ("/remote_settings/make_invisible", test_make_invisible); + g_test_add_func ("/remote_settings/make_visible", test_make_visible); + g_test_add_func ("/remote_settings/remove_connection", test_remove_connection); ret = g_test_run (); |