From 13d5b5a2a525e3fc351ec2bb742606de2b28291a Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Thu, 16 Mar 2023 18:25:20 -0700 Subject: 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. --- tests/libpeas/engine.c | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'tests') 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 -- cgit v1.2.1