| author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2011-09-28 16:42:44 (GMT) |
|---|---|---|
| committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-04-17 10:03:08 (GMT) |
| commit | ae0ed3e435c550c3fae1a86a1c3cb42da319dff2 (patch) (side-by-side diff) | |
| tree | 175c42952ce5fd2035b3d8fafff4043e88f4c5ea | |
| parent | 92c613b8f429a4fe6c762805f1a4f3588511e6a7 (diff) | |
| download | dbus-glib-master.zip dbus-glib-master.tar.gz | |
I think this is invalid, although others might disagree.
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=40151
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
| -rw-r--r-- | test/core/error-mapping.c | 26 | ||||
| -rw-r--r-- | test/manual/invalid-usage.c | 25 |
2 files changed, 25 insertions, 26 deletions
diff --git a/test/core/error-mapping.c b/test/core/error-mapping.c index eafef01..122b6de 100644 --- a/test/core/error-mapping.c +++ b/test/core/error-mapping.c @@ -248,30 +248,6 @@ test_unregistered (Fixture *f, } static void -test_nonsensical (Fixture *f, - gconstpointer context) -{ - /* This throws an error with domain 0 and code 0, which makes no sense. - * It's programmer error, really: g_error_new() would critical if given - * the same domain and code. See GNOME#660371. - * - * This was added for fd.o #27799, but there's a difference between - * "this is an error domain, but not one registered with dbus-glib" and - * "this isn't even an error domain". */ - g_test_bug ("27799"); - - if (!org_freedesktop_DBus_GLib_Tests_MyObject_throw_unregistered_error_async ( - f->proxy, throw_error_cb, f)) - g_error ("Failed to start async ThrowUnregisteredError call"); - - while (f->error == NULL) - g_main_context_iteration (NULL, TRUE); - - g_assert_error (f->error, DBUS_GERROR, DBUS_GERROR_REMOTE_EXCEPTION); - assert_contains (f->error->message, "this method always loses more"); -} - -static void teardown (Fixture *f, gconstpointer context G_GNUC_UNUSED) { @@ -314,8 +290,6 @@ main (int argc, teardown); g_test_add ("/error-mapping/multi-word", Fixture, NULL, setup, test_multi_word, teardown); - g_test_add ("/error-mapping/nonsensical", Fixture, NULL, setup, - test_nonsensical, teardown); g_test_add ("/error-mapping/simple", Fixture, NULL, setup, test_simple, teardown); g_test_add ("/error-mapping/underscore", Fixture, NULL, setup, diff --git a/test/manual/invalid-usage.c b/test/manual/invalid-usage.c index 59a8314..95a2591 100644 --- a/test/manual/invalid-usage.c +++ b/test/manual/invalid-usage.c @@ -234,6 +234,29 @@ test_error_out_of_range (Fixture *f, } static void +test_error_domain_0 (Fixture *f, + gconstpointer context) +{ + /* This throws an error with domain 0 and code 0, which makes no sense. + * It's programmer error, really: g_error_new() would critical if given + * the same domain and code. See GNOME#660371. + * + * This was added for fd.o #27799, but there's a difference between + * "this is an error domain, but not one registered with dbus-glib" and + * "this isn't even an error domain". */ + g_test_bug ("27799"); + + if (!org_freedesktop_DBus_GLib_Tests_MyObject_throw_unregistered_error_async ( + f->proxy_for_self, throw_error_cb, f)) + g_error ("Failed to start async ThrowUnregisteredError call"); + + while (f->error == NULL) + g_main_context_iteration (NULL, TRUE); + + g_assert_error (f->error, DBUS_GERROR, DBUS_GERROR_REMOTE_EXCEPTION); +} + +static void teardown (Fixture *f, gconstpointer context G_GNUC_UNUSED) { @@ -290,6 +313,8 @@ main (int argc, teardown); g_test_add ("/invalid/error/out-of-range", Fixture, NULL, setup, test_error_out_of_range, teardown); + g_test_add ("/invalid/error/domain-0", Fixture, NULL, setup, + test_error_domain_0, teardown); return g_test_run (); } |
