diff options
author | Christian Hergert <chergert@redhat.com> | 2023-03-16 18:25:20 -0700 |
---|---|---|
committer | Christian Hergert <chergert@redhat.com> | 2023-03-22 16:44:35 -0700 |
commit | 13d5b5a2a525e3fc351ec2bb742606de2b28291a (patch) | |
tree | 3e6b7b08e3dfffe6a2da0e22e5208493a1bedd3b /tests | |
parent | f50906cc36777d254dee2bc4b829a9b6aea5b92d (diff) | |
download | libpeas-13d5b5a2a525e3fc351ec2bb742606de2b28291a.tar.gz |
janitorial: modernize PeasEngine
This uses the modern macros for defining types and also ensures that the
engine is a final type. We can drop the private pointer as well since we
are final.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/libpeas/engine.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/tests/libpeas/engine.c b/tests/libpeas/engine.c index 6eb3db2..a182978 100644 --- a/tests/libpeas/engine.c +++ b/tests/libpeas/engine.c @@ -94,7 +94,6 @@ test_engine_dispose (PeasEngine *engine) static void test_engine_get_default (void) { - GType the_type; PeasEngine *test_engine; g_assert (peas_engine_get_default () == peas_engine_get_default ()); @@ -105,22 +104,6 @@ test_engine_get_default (void) (gpointer *) &test_engine); g_object_unref (test_engine); g_assert (test_engine == NULL); - - - /* Check that the default engine is the newly created engine - * even when peas_engine_get_default() is called during init(). - */ - the_type = g_type_register_static_simple (PEAS_TYPE_ENGINE, - "TestEngineGetDefault", - sizeof (PeasEngineClass), NULL, - sizeof (PeasEngine), - (GInstanceInitFunc) peas_engine_get_default, - 0); - test_engine = PEAS_ENGINE (g_object_new (the_type, NULL)); - - g_assert (peas_engine_get_default () == test_engine); - - g_object_unref (test_engine); } static void |