From 44700f9ec734e201099525a936ce017cc3154355 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Mon, 17 Jul 2023 14:04:10 -0700 Subject: [PATCH 1/2] tests: use g_assert_true() instead of g_assert() We don't want to run into runtime errors for various release builds, so ensure that we use the always-on variant of g_assert(). Fixes #32 --- tests/libpeas/engine.c | 92 +++++++++---------- tests/libpeas/extension-c.c | 48 +++++----- tests/libpeas/extension-gjs.c | 10 +- tests/libpeas/extension-lua.c | 12 +-- tests/libpeas/extension-py.c | 18 ++-- tests/libpeas/extension-set.c | 40 ++++---- .../introspection/introspection-base.c | 4 +- .../introspection/introspection-callable.c | 8 +- tests/libpeas/plugin-info.c | 36 ++++---- tests/libpeas/testing/testing-extension.c | 76 +++++++-------- tests/testing-util/testing-util.c | 10 +- 11 files changed, 177 insertions(+), 177 deletions(-) diff --git a/tests/libpeas/engine.c b/tests/libpeas/engine.c index 79dd63f..766564a 100644 --- a/tests/libpeas/engine.c +++ b/tests/libpeas/engine.c @@ -66,13 +66,13 @@ test_engine_new (PeasEngine *engine) /* Only one testing engine can be alive */ new_engine = peas_engine_new (); - g_assert (engine != NULL); - g_assert (new_engine != NULL); + g_assert_true (engine != NULL); + g_assert_true (new_engine != NULL); /* Does not return the same engine */ - g_assert (engine != new_engine); + g_assert_true (engine != new_engine); /* peas_engine_new() sets the default engine */ - g_assert (engine == peas_engine_get_default ()); + g_assert_true (engine == peas_engine_get_default ()); g_object_unref (new_engine); } @@ -96,14 +96,14 @@ test_engine_get_default (void) { PeasEngine *test_engine; - g_assert (peas_engine_get_default () == peas_engine_get_default ()); + g_assert_true (peas_engine_get_default () == peas_engine_get_default ()); /* Only has a single ref */ test_engine = peas_engine_get_default (); g_object_add_weak_pointer (G_OBJECT (test_engine), (gpointer *) &test_engine); g_object_unref (test_engine); - g_assert (test_engine == NULL); + g_assert_true (test_engine == NULL); } static void @@ -113,11 +113,11 @@ test_engine_load_plugin (PeasEngine *engine) info = peas_engine_get_plugin_info (engine, "loadable"); - g_assert (peas_engine_load_plugin (engine, info)); - g_assert (peas_plugin_info_is_loaded (info)); + g_assert_true (peas_engine_load_plugin (engine, info)); + g_assert_true (peas_plugin_info_is_loaded (info)); /* Check that we can load a plugin that is already loaded */ - g_assert (peas_engine_load_plugin (engine, info)); + g_assert_true (peas_engine_load_plugin (engine, info)); } static void @@ -127,12 +127,12 @@ test_engine_load_plugin_with_dep (PeasEngine *engine) info = peas_engine_get_plugin_info (engine, "has-dep"); - g_assert (peas_engine_load_plugin (engine, info)); - g_assert (peas_plugin_info_is_loaded (info)); + g_assert_true (peas_engine_load_plugin (engine, info)); + g_assert_true (peas_plugin_info_is_loaded (info)); info = peas_engine_get_plugin_info (engine, "loadable"); - g_assert (peas_plugin_info_is_loaded (info)); + g_assert_true (peas_plugin_info_is_loaded (info)); } static void @@ -142,8 +142,8 @@ test_engine_load_plugin_with_self_dep (PeasEngine *engine) info = peas_engine_get_plugin_info (engine, "self-dep"); - g_assert (peas_engine_load_plugin (engine, info)); - g_assert (peas_plugin_info_is_loaded (info)); + g_assert_true (peas_engine_load_plugin (engine, info)); + g_assert_true (peas_plugin_info_is_loaded (info)); } static void @@ -156,9 +156,9 @@ test_engine_load_plugin_with_nonexistent_dep (PeasEngine *engine) info = peas_engine_get_plugin_info (engine, "nonexistent-dep"); - g_assert (!peas_engine_load_plugin (engine, info)); - g_assert (!peas_plugin_info_is_loaded (info)); - g_assert (!peas_plugin_info_is_available (info, &error)); + g_assert_true (!peas_engine_load_plugin (engine, info)); + g_assert_true (!peas_plugin_info_is_loaded (info)); + g_assert_true (!peas_plugin_info_is_available (info, &error)); g_assert_error (error, PEAS_PLUGIN_INFO_ERROR, PEAS_PLUGIN_INFO_ERROR_DEP_NOT_FOUND); @@ -173,12 +173,12 @@ test_engine_unload_plugin (PeasEngine *engine) info = peas_engine_get_plugin_info (engine, "loadable"); /* Check that we can unload a plugin that is not loaded */ - g_assert (peas_engine_unload_plugin (engine, info)); + g_assert_true (peas_engine_unload_plugin (engine, info)); test_engine_load_plugin (engine); - g_assert (peas_engine_unload_plugin (engine, info)); - g_assert (!peas_plugin_info_is_loaded (info)); + g_assert_true (peas_engine_unload_plugin (engine, info)); + g_assert_true (!peas_plugin_info_is_loaded (info)); } static void @@ -190,12 +190,12 @@ test_engine_unload_plugin_with_dep (PeasEngine *engine) info = peas_engine_get_plugin_info (engine, "loadable"); - g_assert (peas_engine_unload_plugin (engine, info)); - g_assert (!peas_plugin_info_is_loaded (info)); + g_assert_true (peas_engine_unload_plugin (engine, info)); + g_assert_true (!peas_plugin_info_is_loaded (info)); info = peas_engine_get_plugin_info (engine, "has-dep"); - g_assert (!peas_plugin_info_is_loaded (info)); + g_assert_true (!peas_plugin_info_is_loaded (info)); } static void @@ -207,8 +207,8 @@ test_engine_unload_plugin_with_self_dep (PeasEngine *engine) info = peas_engine_get_plugin_info (engine, "self-dep"); - g_assert (peas_engine_unload_plugin (engine, info)); - g_assert (!peas_plugin_info_is_loaded (info)); + g_assert_true (peas_engine_unload_plugin (engine, info)); + g_assert_true (!peas_plugin_info_is_loaded (info)); } static void @@ -220,9 +220,9 @@ test_engine_unavailable_plugin (PeasEngine *engine) info = peas_engine_get_plugin_info (engine, "unavailable"); - g_assert (!peas_engine_load_plugin (engine, info)); - g_assert (!peas_plugin_info_is_loaded (info)); - g_assert (!peas_plugin_info_is_available (info, NULL)); + g_assert_true (!peas_engine_load_plugin (engine, info)); + g_assert_true (!peas_plugin_info_is_loaded (info)); + g_assert_true (!peas_plugin_info_is_available (info, NULL)); } static void @@ -236,9 +236,9 @@ test_engine_not_loadable_plugin (PeasEngine *engine) info = peas_engine_get_plugin_info (engine, "not-loadable"); - g_assert (!peas_engine_load_plugin (engine, info)); - g_assert (!peas_plugin_info_is_loaded (info)); - g_assert (!peas_plugin_info_is_available (info, &error)); + g_assert_true (!peas_engine_load_plugin (engine, info)); + g_assert_true (!peas_plugin_info_is_loaded (info)); + g_assert_true (!peas_plugin_info_is_available (info, &error)); g_assert_error (error, PEAS_PLUGIN_INFO_ERROR, PEAS_PLUGIN_INFO_ERROR_LOADING_FAILED); @@ -348,7 +348,7 @@ test_engine_loaded_plugins (PeasEngine *engine) /* Need to cause the plugin to be unavailable */ info = peas_engine_get_plugin_info (engine, "unavailable"); - g_assert (!peas_engine_load_plugin (engine, info)); + g_assert_true (!peas_engine_load_plugin (engine, info)); info = peas_engine_get_plugin_info (engine, "loadable"); @@ -358,16 +358,16 @@ test_engine_loaded_plugins (PeasEngine *engine) /* Unload all plugins */ peas_engine_set_loaded_plugins (engine, NULL); g_assert_cmpint (loaded, ==, 0); - g_assert (loaded_plugins != NULL); - g_assert (loaded_plugins[0] == NULL); + g_assert_true (loaded_plugins != NULL); + g_assert_true (loaded_plugins[0] == NULL); load_plugins = g_new0 (char *, 1); peas_engine_set_loaded_plugins (engine, (const char **) load_plugins); g_strfreev (load_plugins); g_assert_cmpint (loaded, ==, 0); - g_assert (loaded_plugins != NULL); - g_assert (loaded_plugins[0] == NULL); + g_assert_true (loaded_plugins != NULL); + g_assert_true (loaded_plugins[0] == NULL); /* Load a plugin */ @@ -377,9 +377,9 @@ test_engine_loaded_plugins (PeasEngine *engine) g_strfreev (load_plugins); g_assert_cmpint (loaded, ==, 1); - g_assert (loaded_plugins != NULL); + g_assert_true (loaded_plugins != NULL); g_assert_cmpstr (loaded_plugins[0], ==, "loadable"); - g_assert (loaded_plugins[1] == NULL); + g_assert_true (loaded_plugins[1] == NULL); /* Try to load an unavailable plugin */ @@ -389,23 +389,23 @@ test_engine_loaded_plugins (PeasEngine *engine) g_strfreev (load_plugins); g_assert_cmpint (loaded, ==, 0); - g_assert (loaded_plugins != NULL); - g_assert (loaded_plugins[0] == NULL); + g_assert_true (loaded_plugins != NULL); + g_assert_true (loaded_plugins[0] == NULL); - g_assert (peas_engine_load_plugin (engine, info)); + g_assert_true (peas_engine_load_plugin (engine, info)); g_assert_cmpint (loaded, ==, 1); - g_assert (loaded_plugins != NULL); + g_assert_true (loaded_plugins != NULL); g_assert_cmpstr (loaded_plugins[0], ==, "loadable"); - g_assert (loaded_plugins[1] == NULL); + g_assert_true (loaded_plugins[1] == NULL); g_object_unref (engine); g_assert_cmpint (loaded, ==, 0); - g_assert (loaded_plugins != NULL); + g_assert_true (loaded_plugins != NULL); g_assert_cmpstr (loaded_plugins[0], ==, "loadable"); - g_assert (loaded_plugins[1] == NULL); + g_assert_true (loaded_plugins[1] == NULL); g_strfreev (loaded_plugins); } @@ -452,7 +452,7 @@ test_engine_shutdown_subprocess (PeasEngine *engine) /* Cannot create an engine because libpeas has been shutdown */ engine = peas_engine_new (); - g_assert (engine == NULL); + g_assert_true (engine == NULL); } int diff --git a/tests/libpeas/extension-c.c b/tests/libpeas/extension-c.c index 55c559c..27d5e9f 100644 --- a/tests/libpeas/extension-c.c +++ b/tests/libpeas/extension-c.c @@ -42,10 +42,10 @@ test_extension_c_embedded (PeasEngine *engine) info = peas_engine_get_plugin_info (engine, "embedded"); /* Check that the various data is correct */ - g_assert (!peas_plugin_info_is_loaded (info)); - g_assert (peas_plugin_info_is_available (info, NULL)); - g_assert (!peas_plugin_info_is_builtin (info)); - g_assert (!peas_plugin_info_is_hidden (info)); + g_assert_true (!peas_plugin_info_is_loaded (info)); + g_assert_true (peas_plugin_info_is_available (info, NULL)); + g_assert_true (!peas_plugin_info_is_builtin (info)); + g_assert_true (!peas_plugin_info_is_hidden (info)); g_assert_cmpstr (peas_plugin_info_get_module_name (info), ==, "embedded"); g_assert_cmpstr (peas_plugin_info_get_module_dir (info), ==, "resource:///org/gnome/libpeas/tests/plugins"); @@ -55,22 +55,22 @@ test_extension_c_embedded (PeasEngine *engine) "testing_embedded_plugin_register_types"); /* Check that we can load and unload the plugin multiple times */ - g_assert (peas_engine_load_plugin (engine, info)); - g_assert (peas_plugin_info_is_loaded (info)); - g_assert (peas_engine_load_plugin (engine, info)); - g_assert (peas_plugin_info_is_loaded (info)); - g_assert (peas_engine_unload_plugin (engine, info)); - g_assert (!peas_plugin_info_is_loaded (info)); - g_assert (peas_engine_unload_plugin (engine, info)); - g_assert (!peas_plugin_info_is_loaded (info)); - g_assert (peas_engine_load_plugin (engine, info)); - g_assert (peas_plugin_info_is_loaded (info)); + g_assert_true (peas_engine_load_plugin (engine, info)); + g_assert_true (peas_plugin_info_is_loaded (info)); + g_assert_true (peas_engine_load_plugin (engine, info)); + g_assert_true (peas_plugin_info_is_loaded (info)); + g_assert_true (peas_engine_unload_plugin (engine, info)); + g_assert_true (!peas_plugin_info_is_loaded (info)); + g_assert_true (peas_engine_unload_plugin (engine, info)); + g_assert_true (!peas_plugin_info_is_loaded (info)); + g_assert_true (peas_engine_load_plugin (engine, info)); + g_assert_true (peas_plugin_info_is_loaded (info)); extension = peas_engine_create_extension (engine, info, INTROSPECTION_TYPE_ACTIVATABLE, NULL); - g_assert (TESTING_IS_EMBEDDED_PLUGIN (extension)); + g_assert_true (TESTING_IS_EMBEDDED_PLUGIN (extension)); g_object_unref (extension); } @@ -86,7 +86,7 @@ test_extension_c_embedded_missing_symbol (PeasEngine *engine) info = peas_engine_get_plugin_info (engine, "embedded-missing-symbol"); - g_assert (!peas_engine_load_plugin (engine, info)); + g_assert_true (!peas_engine_load_plugin (engine, info)); } static void @@ -99,7 +99,7 @@ test_extension_c_instance_refcount (PeasEngine *engine, INTROSPECTION_TYPE_BASE, NULL); - g_assert (G_IS_OBJECT (extension)); + g_assert_true (G_IS_OBJECT (extension)); /* The refcount of the returned object should be 1: * - one ref for the PeasExtension @@ -119,7 +119,7 @@ test_extension_c_nonexistent (PeasEngine *engine) info = peas_engine_get_plugin_info (engine, "extension-c-nonexistent"); - g_assert (!peas_engine_load_plugin (engine, info)); + g_assert_true (!peas_engine_load_plugin (engine, info)); } static void @@ -131,7 +131,7 @@ test_extension_c_local_linkage (PeasEngine *engine, gpointer c_global_symbol, loadable_global_symbol; loadable_info = peas_engine_get_plugin_info (engine, "loadable"); - g_assert (peas_engine_load_plugin (engine, loadable_info)); + g_assert_true (peas_engine_load_plugin (engine, loadable_info)); c_extension = peas_engine_create_extension (engine, info, INTROSPECTION_TYPE_BASE, @@ -140,9 +140,9 @@ test_extension_c_local_linkage (PeasEngine *engine, INTROSPECTION_TYPE_ACTIVATABLE, NULL); - g_assert (G_IS_OBJECT (c_extension)); - g_assert (G_IS_OBJECT (loadable_extension)); - g_assert (c_extension != loadable_extension); + g_assert_true (G_IS_OBJECT (c_extension)); + g_assert_true (G_IS_OBJECT (loadable_extension)); + g_assert_true (c_extension != loadable_extension); g_object_get (c_extension, "global-symbol-clash", &c_global_symbol, @@ -154,7 +154,7 @@ test_extension_c_local_linkage (PeasEngine *engine, /* Both plugins export the same global variable, * check that they are not the same global reference */ - g_assert (c_global_symbol != loadable_global_symbol); + g_assert_true (c_global_symbol != loadable_global_symbol); g_object_unref (loadable_extension); g_object_unref (c_extension); @@ -172,7 +172,7 @@ test_extension_c_missing_symbol (PeasEngine *engine) info = peas_engine_get_plugin_info (engine, "extension-c-missing-symbol"); - g_assert (!peas_engine_load_plugin (engine, info)); + g_assert_true (!peas_engine_load_plugin (engine, info)); } int diff --git a/tests/libpeas/extension-gjs.c b/tests/libpeas/extension-gjs.c index 62db7ae..491ce4a 100644 --- a/tests/libpeas/extension-gjs.c +++ b/tests/libpeas/extension-gjs.c @@ -46,8 +46,8 @@ test_extension_gjs_instance_refcount (PeasEngine *engine, INTROSPECTION_TYPE_BASE, NULL); - g_assert (G_IS_OBJECT (extension)); - g_assert (INTROSPECTION_IS_BASE (extension)); + g_assert_true (G_IS_OBJECT (extension)); + g_assert_true (INTROSPECTION_IS_BASE (extension)); g_object_add_weak_pointer (extension, (gpointer *) &extension); @@ -76,7 +76,7 @@ test_extension_gjs_activatable_subject_refcount (PeasEngine *engine, "object", object, NULL); - g_assert (G_IS_OBJECT (extension)); + g_assert_true (G_IS_OBJECT (extension)); g_assert_cmpint (object->ref_count, ==, 2); g_assert_cmpint (G_OBJECT (extension)->ref_count, ==, 2); @@ -99,8 +99,8 @@ test_extension_gjs_nonexistent (PeasEngine *engine) info = peas_engine_get_plugin_info (engine, "extension-" GJS_LOADER_STR "-nonexistent"); - g_assert (info != NULL); - g_assert (!peas_engine_load_plugin (engine, info)); + g_assert_true (info != NULL); + g_assert_true (!peas_engine_load_plugin (engine, info)); } int diff --git a/tests/libpeas/extension-lua.c b/tests/libpeas/extension-lua.c index 709e0a3..ea15c0e 100644 --- a/tests/libpeas/extension-lua.c +++ b/tests/libpeas/extension-lua.c @@ -75,7 +75,7 @@ test_extension_lua_instance_refcount (PeasEngine *engine, NULL); g_object_add_weak_pointer (extension, (gpointer *) &extension); - g_assert (G_IS_OBJECT (extension)); + g_assert_true (G_IS_OBJECT (extension)); /* The Lua wrapper created around the extension * object should have increased its refcount by 1. @@ -96,7 +96,7 @@ test_extension_lua_instance_refcount (PeasEngine *engine, /* The Lua wrapper around the extension has been garbage collected */ peas_engine_garbage_collect (engine); - g_assert (extension == NULL); + g_assert_true (extension == NULL); set_garbage_collector_state (engine, info, TRUE); } @@ -125,7 +125,7 @@ test_extension_lua_activatable_subject_refcount (PeasEngine *engine, NULL); g_object_add_weak_pointer (extension, (gpointer *) &extension); - g_assert (G_IS_OBJECT (extension)); + g_assert_true (G_IS_OBJECT (extension)); /* The Lua wrapper created around our dummy * object should have increased its refcount by 1. @@ -134,7 +134,7 @@ test_extension_lua_activatable_subject_refcount (PeasEngine *engine, g_assert_cmpint (object->ref_count, ==, 2); g_object_unref (extension); - g_assert (extension == NULL); + g_assert_true (extension == NULL); /* We unreffed the extension, so it should have been * destroyed and our dummy object's refcount should be back to 1. @@ -143,7 +143,7 @@ test_extension_lua_activatable_subject_refcount (PeasEngine *engine, g_assert_cmpint (object->ref_count, ==, 1); g_object_unref (object); - g_assert (object == NULL); + g_assert_true (object == NULL); set_garbage_collector_state (engine, info, TRUE); } @@ -158,7 +158,7 @@ test_extension_lua_nonexistent (PeasEngine *engine) info = peas_engine_get_plugin_info (engine, "extension-lua51-nonexistent"); - g_assert (!peas_engine_load_plugin (engine, info)); + g_assert_true (!peas_engine_load_plugin (engine, info)); } int diff --git a/tests/libpeas/extension-py.c b/tests/libpeas/extension-py.c index ed086e2..4ac6fe5 100644 --- a/tests/libpeas/extension-py.c +++ b/tests/libpeas/extension-py.c @@ -47,14 +47,14 @@ test_extension_py_instance_refcount (PeasEngine *engine, INTROSPECTION_TYPE_BASE, NULL); - g_assert (G_IS_OBJECT (extension)); + g_assert_true (G_IS_OBJECT (extension)); g_object_add_weak_pointer (extension, (gpointer *) &extension); g_assert_cmpint (extension->ref_count, ==, 2); g_object_unref (extension); - g_assert (extension == NULL); + g_assert_true (extension == NULL); } static void @@ -77,7 +77,7 @@ test_extension_py_activatable_subject_refcount (PeasEngine *engine, "object", object, NULL); - g_assert (G_IS_OBJECT (extension)); + g_assert_true (G_IS_OBJECT (extension)); /* The python wrapper created around our dummy object should have increased * its refcount by 1. @@ -111,7 +111,7 @@ test_extension_py_nonexistent (PeasEngine *engine) info = peas_engine_get_plugin_info (engine, "extension-" PY_LOADER_STR "-nonexistent"); - g_assert (!peas_engine_load_plugin (engine, info)); + g_assert_true (!peas_engine_load_plugin (engine, info)); } static void @@ -131,14 +131,14 @@ test_extension_py_already_initialized_subprocess (void) PyObject *module, *dict, *pyengine, *result; /* Check that python has not been initialized yet */ - g_assert (!Py_IsInitialized ()); + g_assert_true (!Py_IsInitialized ()); Py_InitializeEx (FALSE); /* Initialize PyGObject */ pygobject_init (PYGOBJECT_MAJOR_VERSION, PYGOBJECT_MINOR_VERSION, PYGOBJECT_MICRO_VERSION); - g_assert (!PyErr_Occurred ()); + g_assert_true (!PyErr_Occurred ()); engine = testing_engine_new (); peas_engine_enable_loader (engine, PY_LOADER_STR); @@ -147,7 +147,7 @@ test_extension_py_already_initialized_subprocess (void) dict = PyModule_GetDict (module); pyengine = pygobject_new (G_OBJECT (engine)); - g_assert (PyDict_SetItemString (dict, "engine", pyengine) == 0); + g_assert_true (PyDict_SetItemString (dict, "engine", pyengine) == 0); Py_DECREF (pyengine); result = PyRun_String ("plugin_name = 'extension-" PY_LOADER_STR "'\n" @@ -156,7 +156,7 @@ test_extension_py_already_initialized_subprocess (void) Py_file_input, dict, dict); Py_XDECREF (result); - g_assert (!PyErr_Occurred ()); + g_assert_true (!PyErr_Occurred ()); PyDict_Clear (dict); testing_engine_free (engine); @@ -164,7 +164,7 @@ test_extension_py_already_initialized_subprocess (void) _peas_engine_shutdown (); /* Should still be initialized */ - g_assert (Py_IsInitialized ()); + g_assert_true (Py_IsInitialized ()); Py_Finalize (); } diff --git a/tests/libpeas/extension-set.c b/tests/libpeas/extension-set.c index 9f3a48e..6ed6f39 100644 --- a/tests/libpeas/extension-set.c +++ b/tests/libpeas/extension-set.c @@ -103,12 +103,12 @@ testing_extension_set_new (PeasEngine *engine, g_assert_cmpint (*active, ==, i); info = peas_engine_get_plugin_info (engine, loadable_plugins[i]); - g_assert (peas_engine_load_plugin (engine, info)); + g_assert_true (peas_engine_load_plugin (engine, info)); } /* Load a plugin that does not provide a IntrospectionActivatable */ info = peas_engine_get_plugin_info (engine, "extension-c"); - g_assert (peas_engine_load_plugin (engine, info)); + g_assert_true (peas_engine_load_plugin (engine, info)); g_assert_cmpint (*active, ==, G_N_ELEMENTS (loadable_plugins)); @@ -184,10 +184,10 @@ test_extension_set_create_valid_with_properties (PeasEngine *engine) &obj_cmp); info = peas_engine_get_plugin_info (engine, "builtin"); - g_assert (peas_engine_load_plugin (engine, info)); - g_assert (obj == obj_cmp); + g_assert_true (peas_engine_load_plugin (engine, info)); + g_assert_true (obj == obj_cmp); - g_assert (PEAS_IS_EXTENSION_SET (extension_set)); + g_assert_true (PEAS_IS_EXTENSION_SET (extension_set)); g_assert_finalize_object (extension_set); g_value_unset (&prop_value); @@ -206,12 +206,12 @@ test_extension_set_create_invalid (PeasEngine *engine) /* Invalid GType */ extension_set = peas_extension_set_new (engine, G_TYPE_INVALID, NULL); - g_assert (!PEAS_IS_EXTENSION_SET (extension_set)); + g_assert_true (!PEAS_IS_EXTENSION_SET (extension_set)); /* GObject but not a GInterface */ extension_set = peas_extension_set_new (engine, G_TYPE_OBJECT, NULL); - g_assert (!PEAS_IS_EXTENSION_SET (extension_set)); + g_assert_true (!PEAS_IS_EXTENSION_SET (extension_set)); /* Interface does not have an 'invalid-property' property */ @@ -219,7 +219,7 @@ test_extension_set_create_invalid (PeasEngine *engine) INTROSPECTION_TYPE_ACTIVATABLE, "invalid-property", "does-not-exist", NULL); - g_assert (!PEAS_IS_EXTENSION_SET (extension_set)); + g_assert_true (!PEAS_IS_EXTENSION_SET (extension_set)); } static void @@ -246,14 +246,14 @@ test_extension_set_create_invalid_with_properties (PeasEngine *engine) n_elements, prop_names, prop_values); - g_assert (!PEAS_IS_EXTENSION_SET (extension_set)); + g_assert_true (!PEAS_IS_EXTENSION_SET (extension_set)); g_value_unset (&prop_values[0]); /* Invalid GType */ extension_set = peas_extension_set_new_with_properties (engine, G_TYPE_INVALID, 0, NULL, NULL); - g_assert (!PEAS_IS_EXTENSION_SET (extension_set)); + g_assert_true (!PEAS_IS_EXTENSION_SET (extension_set)); /* Uninitialized GValue */ n_elements = 1; @@ -262,7 +262,7 @@ test_extension_set_create_invalid_with_properties (PeasEngine *engine) n_elements, prop_names, prop_values); - g_assert (!PEAS_IS_EXTENSION_SET (extension_set)); + g_assert_true (!PEAS_IS_EXTENSION_SET (extension_set)); /* Uninitialized GValue*/ g_value_init (&prop_values[0], G_TYPE_POINTER); @@ -273,7 +273,7 @@ test_extension_set_create_invalid_with_properties (PeasEngine *engine) n_elements, prop_names_not_exist, prop_values); - g_assert (!PEAS_IS_EXTENSION_SET (extension_set)); + g_assert_true (!PEAS_IS_EXTENSION_SET (extension_set)); g_value_unset (&prop_values[0]); } @@ -309,7 +309,7 @@ test_extension_set_extension_removed (PeasEngine *engine) /* Unload the plugin that does not provide a IntrospectionActivatable */ info = peas_engine_get_plugin_info (engine, "extension-c"); - g_assert (peas_engine_unload_plugin (engine, info)); + g_assert_true (peas_engine_unload_plugin (engine, info)); /* To keep deps in order */ for (i = G_N_ELEMENTS (loadable_plugins); i > 0; --i) @@ -318,7 +318,7 @@ test_extension_set_extension_removed (PeasEngine *engine) info = peas_engine_get_plugin_info (engine, loadable_plugins[i - 1]); - g_assert (peas_engine_unload_plugin (engine, info)); + g_assert_true (peas_engine_unload_plugin (engine, info)); } g_assert_cmpint (active, ==, 0); @@ -337,14 +337,14 @@ test_extension_set_get_extension (PeasEngine *engine) info = peas_engine_get_plugin_info (engine, loadable_plugins[0]); extension = peas_extension_set_get_extension (extension_set, info); - g_assert (INTROSPECTION_IS_ACTIVATABLE (extension)); + g_assert_true (INTROSPECTION_IS_ACTIVATABLE (extension)); g_object_add_weak_pointer (G_OBJECT (extension), (gpointer) &extension); - g_assert (peas_engine_unload_plugin (engine, info)); + g_assert_true (peas_engine_unload_plugin (engine, info)); - g_assert (extension == NULL); - g_assert (peas_extension_set_get_extension (extension_set, info) == NULL); + g_assert_true (extension == NULL); + g_assert_true (peas_extension_set_get_extension (extension_set, info) == NULL); g_object_unref (extension_set); } @@ -401,7 +401,7 @@ test_extension_set_ordering (PeasEngine *engine) peas_extension_set_foreach (extension_set, (PeasExtensionSetForeachFunc) ordering_cb, &foreach_order); - g_assert (foreach_order == NULL); + g_assert_true (foreach_order == NULL); g_signal_connect (extension_set, @@ -409,7 +409,7 @@ test_extension_set_ordering (PeasEngine *engine) G_CALLBACK (ordering_cb), &dispose_order); g_object_unref (extension_set); - g_assert (dispose_order == NULL); + g_assert_true (dispose_order == NULL); } int diff --git a/tests/libpeas/introspection/introspection-base.c b/tests/libpeas/introspection/introspection-base.c index 89cb4a9..a368adc 100644 --- a/tests/libpeas/introspection/introspection-base.c +++ b/tests/libpeas/introspection/introspection-base.c @@ -46,7 +46,7 @@ introspection_base_get_plugin_info (IntrospectionBase *base) g_return_val_if_fail (INTROSPECTION_IS_BASE (base), NULL); iface = INTROSPECTION_BASE_GET_IFACE (base); - g_assert (iface->get_plugin_info != NULL); + g_assert_true (iface->get_plugin_info != NULL); return iface->get_plugin_info (base); } @@ -65,7 +65,7 @@ introspection_base_get_settings (IntrospectionBase *base) g_return_val_if_fail (INTROSPECTION_IS_BASE (base), NULL); iface = INTROSPECTION_BASE_GET_IFACE (base); - g_assert (iface->get_settings != NULL); + g_assert_true (iface->get_settings != NULL); return iface->get_settings (base); } diff --git a/tests/libpeas/introspection/introspection-callable.c b/tests/libpeas/introspection/introspection-callable.c index c818186..78332f9 100644 --- a/tests/libpeas/introspection/introspection-callable.c +++ b/tests/libpeas/introspection/introspection-callable.c @@ -46,7 +46,7 @@ introspection_callable_call_with_return (IntrospectionCallable *callable) g_return_val_if_fail (INTROSPECTION_IS_CALLABLE (callable), NULL); iface = INTROSPECTION_CALLABLE_GET_IFACE (callable); - g_assert (iface->call_with_return != NULL); + g_assert_true (iface->call_with_return != NULL); return iface->call_with_return (callable); } @@ -63,7 +63,7 @@ introspection_callable_call_no_args (IntrospectionCallable *callable) g_return_if_fail (INTROSPECTION_IS_CALLABLE (callable)); iface = INTROSPECTION_CALLABLE_GET_IFACE (callable); - g_assert (iface->call_no_args != NULL); + g_assert_true (iface->call_no_args != NULL); iface->call_no_args (callable); } @@ -82,7 +82,7 @@ introspection_callable_call_single_arg (IntrospectionCallable *callable, g_return_if_fail (INTROSPECTION_IS_CALLABLE (callable)); iface = INTROSPECTION_CALLABLE_GET_IFACE (callable); - g_assert (iface->call_single_arg != NULL); + g_assert_true (iface->call_single_arg != NULL); iface->call_single_arg (callable, called); } @@ -105,7 +105,7 @@ introspection_callable_call_multi_args (IntrospectionCallable *callable, g_return_if_fail (INTROSPECTION_IS_CALLABLE (callable)); iface = INTROSPECTION_CALLABLE_GET_IFACE (callable); - g_assert (iface->call_multi_args != NULL); + g_assert_true (iface->call_multi_args != NULL); iface->call_multi_args (callable, in, out, inout); } diff --git a/tests/libpeas/plugin-info.c b/tests/libpeas/plugin-info.c index 98f124d..663da2e 100644 --- a/tests/libpeas/plugin-info.c +++ b/tests/libpeas/plugin-info.c @@ -66,14 +66,14 @@ test_plugin_info_verify_full_info (PeasEngine *engine) info = peas_engine_get_plugin_info (engine, "full-info"); - g_assert (!peas_plugin_info_is_loaded (info)); - g_assert (peas_plugin_info_is_available (info, &error)); + g_assert_true (!peas_plugin_info_is_loaded (info)); + g_assert_true (peas_plugin_info_is_available (info, &error)); g_assert_no_error (error); - g_assert (peas_plugin_info_is_builtin (info)); + g_assert_true (peas_plugin_info_is_builtin (info)); g_assert_cmpstr (peas_plugin_info_get_module_name (info), ==, "full-info"); - g_assert (g_str_has_suffix (peas_plugin_info_get_module_dir (info), "/tests/plugins")); - g_assert (g_str_has_suffix (peas_plugin_info_get_data_dir (info), "/tests/plugins" G_DIR_SEPARATOR_S "full-info")); + g_assert_true (g_str_has_suffix (peas_plugin_info_get_module_dir (info), "/tests/plugins")); + g_assert_true (g_str_has_suffix (peas_plugin_info_get_data_dir (info), "/tests/plugins" G_DIR_SEPARATOR_S "full-info")); g_assert_cmpstr (peas_plugin_info_get_dependencies (info)[0], ==, "something"); g_assert_cmpstr (peas_plugin_info_get_dependencies (info)[1], ==, "something-else"); @@ -88,7 +88,7 @@ test_plugin_info_verify_full_info (PeasEngine *engine) g_assert_cmpstr (peas_plugin_info_get_help_uri (info), ==, "Help Me!"); authors = peas_plugin_info_get_authors (info); - g_assert (authors != NULL && authors[1] == NULL); + g_assert_true (authors != NULL && authors[1] == NULL); g_assert_cmpstr (authors[0], ==, "Garrett Regier"); g_assert_cmpstr (peas_plugin_info_get_external_data (info, "External"), ==, "external data"); @@ -116,14 +116,14 @@ test_plugin_info_verify_min_info (PeasEngine *engine) info = peas_engine_get_plugin_info (engine, "min-info"); - g_assert (!peas_plugin_info_is_loaded (info)); - g_assert (peas_plugin_info_is_available (info, &error)); + g_assert_true (!peas_plugin_info_is_loaded (info)); + g_assert_true (peas_plugin_info_is_available (info, &error)); g_assert_no_error (error); - g_assert (!peas_plugin_info_is_builtin (info)); + g_assert_true (!peas_plugin_info_is_builtin (info)); g_assert_cmpstr (peas_plugin_info_get_module_name (info), ==, "min-info"); - g_assert (g_str_has_suffix (peas_plugin_info_get_module_dir (info), "/tests/plugins")); - g_assert (g_str_has_suffix (peas_plugin_info_get_data_dir (info), "/tests/plugins" G_DIR_SEPARATOR_S "min-info")); + g_assert_true (g_str_has_suffix (peas_plugin_info_get_module_dir (info), "/tests/plugins")); + g_assert_true (g_str_has_suffix (peas_plugin_info_get_data_dir (info), "/tests/plugins" G_DIR_SEPARATOR_S "min-info")); g_assert_cmpstr (peas_plugin_info_get_dependencies (info)[0], ==, NULL); @@ -136,7 +136,7 @@ test_plugin_info_verify_min_info (PeasEngine *engine) g_assert_cmpstr (peas_plugin_info_get_help_uri (info), ==, NULL); authors = peas_plugin_info_get_authors (info); - g_assert (authors != NULL && authors[0] == NULL); + g_assert_true (authors != NULL && authors[0] == NULL); } static void @@ -146,27 +146,27 @@ test_plugin_info_has_dep (PeasEngine *engine) info = peas_engine_get_plugin_info (engine, "full-info"); - g_assert (peas_plugin_info_has_dependency (info, "something")); - g_assert (peas_plugin_info_has_dependency (info, "something-else")); - g_assert (!peas_plugin_info_has_dependency (info, "does-not-exist")); + g_assert_true (peas_plugin_info_has_dependency (info, "something")); + g_assert_true (peas_plugin_info_has_dependency (info, "something-else")); + g_assert_true (!peas_plugin_info_has_dependency (info, "does-not-exist")); info = peas_engine_get_plugin_info (engine, "min-info"); g_assert_cmpstr (peas_plugin_info_get_dependencies (info)[0], ==, NULL); - g_assert (!peas_plugin_info_has_dependency (info, "does-not-exist")); + g_assert_true (!peas_plugin_info_has_dependency (info, "does-not-exist")); } static void test_plugin_info_missing_module (PeasEngine *engine) { - g_assert (peas_engine_get_plugin_info (engine, "invalid-info-module") == NULL); + g_assert_true (peas_engine_get_plugin_info (engine, "invalid-info-module") == NULL); } static void test_plugin_info_missing_name (PeasEngine *engine) { - g_assert (peas_engine_get_plugin_info (engine, "invalid-info-name") == NULL); + g_assert_true (peas_engine_get_plugin_info (engine, "invalid-info-name") == NULL); } static void diff --git a/tests/libpeas/testing/testing-extension.c b/tests/libpeas/testing/testing-extension.c index 31fe0c6..0222cce 100644 --- a/tests/libpeas/testing/testing-extension.c +++ b/tests/libpeas/testing/testing-extension.c @@ -71,8 +71,8 @@ static void test_runner (TestFixture *fixture, gconstpointer data) { - g_assert (fixture->info != NULL); - g_assert (peas_engine_load_plugin (fixture->engine, fixture->info)); + g_assert_true (fixture->info != NULL); + g_assert_true (peas_engine_load_plugin (fixture->engine, fixture->info)); ((void (*) (PeasEngine *, PeasPluginInfo *)) data) (fixture->engine, fixture->info); @@ -87,7 +87,7 @@ test_extension_garbage_collect (PeasEngine *engine, peas_engine_garbage_collect (engine); /* Check that we can collect the garbage when no plugins are loaded */ - g_assert (peas_engine_unload_plugin (engine, info)); + g_assert_true (peas_engine_unload_plugin (engine, info)); loaded_plugins = peas_engine_dup_loaded_plugins (engine); g_assert_cmpstr (loaded_plugins[0], ==, NULL); @@ -100,7 +100,7 @@ static void test_extension_provides_valid (PeasEngine *engine, PeasPluginInfo *info) { - g_assert (peas_engine_provides_extension (engine, info, + g_assert_true (peas_engine_provides_extension (engine, info, INTROSPECTION_TYPE_CALLABLE)); } @@ -120,12 +120,12 @@ test_extension_provides_invalid (PeasEngine *engine, /* Does not implement this GType */ - g_assert (!peas_engine_provides_extension (engine, info, + g_assert_true (!peas_engine_provides_extension (engine, info, INTROSPECTION_TYPE_UNIMPLEMENTED)); /* Not loaded */ - g_assert (peas_engine_unload_plugin (engine, info)); - g_assert (!peas_engine_provides_extension (engine, info, + g_assert_true (peas_engine_unload_plugin (engine, info)); + g_assert_true (!peas_engine_provides_extension (engine, info, INTROSPECTION_TYPE_CALLABLE)); } @@ -139,8 +139,8 @@ test_extension_create_valid (PeasEngine *engine, INTROSPECTION_TYPE_CALLABLE, NULL); - g_assert (G_IS_OBJECT (extension)); - g_assert (INTROSPECTION_IS_CALLABLE (extension)); + g_assert_true (G_IS_OBJECT (extension)); + g_assert_true (INTROSPECTION_IS_CALLABLE (extension)); g_object_unref (extension); } @@ -156,8 +156,8 @@ test_extension_create_valid_without_properties (PeasEngine *engine, INTROSPECTION_TYPE_CALLABLE, 0, NULL, NULL); - g_assert (G_IS_OBJECT (extension)); - g_assert (INTROSPECTION_IS_CALLABLE (extension)); + g_assert_true (G_IS_OBJECT (extension)); + g_assert_true (INTROSPECTION_IS_CALLABLE (extension)); g_object_unref (extension); } @@ -171,7 +171,7 @@ test_extension_create_valid_with_properties (PeasEngine *engine, GValue prop_values[1] = { G_VALUE_INIT }; const char *prop_names[1] = { "abstract-property" }; - g_assert (peas_engine_load_plugin (engine, info)); + g_assert_true (peas_engine_load_plugin (engine, info)); g_value_init (&prop_values[0], G_TYPE_INT); g_value_set_int (&prop_values[0], 47); @@ -201,33 +201,33 @@ test_extension_create_invalid (PeasEngine *engine, /* Invalid GType */ extension = peas_engine_create_extension (engine, info, G_TYPE_INVALID, NULL); - g_assert (!G_IS_OBJECT (extension)); + g_assert_true (!G_IS_OBJECT (extension)); /* GObject but not a GInterface */ extension = peas_engine_create_extension (engine, info, PEAS_TYPE_ENGINE, NULL); - g_assert (!G_IS_OBJECT (extension)); + g_assert_true (!G_IS_OBJECT (extension)); /* Does not implement this GType */ extension = peas_engine_create_extension (engine, info, INTROSPECTION_TYPE_UNIMPLEMENTED, NULL); - g_assert (!G_IS_OBJECT (extension)); + g_assert_true (!G_IS_OBJECT (extension)); /* Interface does not have a specified property */ extension = peas_engine_create_extension (engine, info, INTROSPECTION_TYPE_CALLABLE, "does-not-exist", "", NULL); - g_assert (!G_IS_OBJECT (extension)); + g_assert_true (!G_IS_OBJECT (extension)); /* Not loaded */ - g_assert (peas_engine_unload_plugin (engine, info)); + g_assert_true (peas_engine_unload_plugin (engine, info)); extension = peas_engine_create_extension (engine, info, INTROSPECTION_TYPE_CALLABLE, NULL); - g_assert (!G_IS_OBJECT (extension)); + g_assert_true (!G_IS_OBJECT (extension)); } static void @@ -253,20 +253,20 @@ test_extension_create_invalid_with_properties (PeasEngine *engine, extension = peas_engine_create_extension_with_properties (engine, info, G_TYPE_INVALID, 0, NULL, NULL); - g_assert (!G_IS_OBJECT (extension)); + g_assert_true (!G_IS_OBJECT (extension)); /* GObject but not a GInterface */ extension = peas_engine_create_extension_with_properties (engine, info, PEAS_TYPE_ENGINE, 0, NULL, NULL); - g_assert (!G_IS_OBJECT (extension)); + g_assert_true (!G_IS_OBJECT (extension)); /* Does not implement this GType */ extension = peas_engine_create_extension_with_properties (engine, info, INTROSPECTION_TYPE_UNIMPLEMENTED, 0, NULL, NULL); - g_assert (!G_IS_OBJECT (extension)); + g_assert_true (!G_IS_OBJECT (extension)); /* Interface has a NULL property name*/ extension = @@ -274,7 +274,7 @@ test_extension_create_invalid_with_properties (PeasEngine *engine, INTROSPECTION_TYPE_CALLABLE, G_N_ELEMENTS (prop_names2), prop_names, prop_values); - g_assert (!G_IS_OBJECT (extension)); + g_assert_true (!G_IS_OBJECT (extension)); /* Interface has a not initialiazed GValue */ extension = @@ -282,15 +282,15 @@ test_extension_create_invalid_with_properties (PeasEngine *engine, INTROSPECTION_TYPE_CALLABLE, G_N_ELEMENTS (prop_names2), prop_names2, prop_values2); - g_assert (!G_IS_OBJECT (extension)); + g_assert_true (!G_IS_OBJECT (extension)); /* Not loaded */ - g_assert (peas_engine_unload_plugin (engine, info)); + g_assert_true (peas_engine_unload_plugin (engine, info)); extension = peas_engine_create_extension_with_properties (engine, info, INTROSPECTION_TYPE_CALLABLE, 0, NULL, NULL); - g_assert (!G_IS_OBJECT (extension)); + g_assert_true (!G_IS_OBJECT (extension)); g_value_unset (&prop_values[0]); @@ -308,8 +308,8 @@ test_extension_create_with_prerequisite (PeasEngine *engine, "prerequisite-property", 47, NULL); - g_assert (INTROSPECTION_IS_HAS_PREREQUISITE (extension)); - g_assert (INTROSPECTION_IS_CALLABLE (extension)); + g_assert_true (INTROSPECTION_IS_HAS_PREREQUISITE (extension)); + g_assert_true (INTROSPECTION_IS_CALLABLE (extension)); g_object_get (extension, "prerequisite-property", &prerequisite_property, @@ -327,8 +327,8 @@ test_extension_reload (PeasEngine *engine, for (i = 0; i < 3; ++i) { - g_assert (peas_engine_load_plugin (engine, info)); - g_assert (peas_engine_unload_plugin (engine, info)); + g_assert_true (peas_engine_load_plugin (engine, info)); + g_assert_true (peas_engine_unload_plugin (engine, info)); } } @@ -339,7 +339,7 @@ test_extension_plugin_info (PeasEngine *engine, GObject *extension; IntrospectionBase *base; - g_assert (peas_engine_load_plugin (engine, info)); + g_assert_true (peas_engine_load_plugin (engine, info)); extension = peas_engine_create_extension (engine, info, INTROSPECTION_TYPE_BASE, @@ -347,7 +347,7 @@ test_extension_plugin_info (PeasEngine *engine, base = INTROSPECTION_BASE (extension); - g_assert (introspection_base_get_plugin_info (base) == info); + g_assert_true (introspection_base_get_plugin_info (base) == info); g_object_unref (extension); } @@ -360,7 +360,7 @@ test_extension_get_settings (PeasEngine *engine, IntrospectionBase *base; GSettings *settings; - g_assert (peas_engine_load_plugin (engine, info)); + g_assert_true (peas_engine_load_plugin (engine, info)); extension = peas_engine_create_extension (engine, info, INTROSPECTION_TYPE_BASE, @@ -383,7 +383,7 @@ test_extension_abstract (PeasEngine *engine, GObject *extension; IntrospectionAbstract *abstract; - g_assert (peas_engine_load_plugin (engine, info)); + g_assert_true (peas_engine_load_plugin (engine, info)); extension = peas_engine_create_extension (engine, info, INTROSPECTION_TYPE_ABSTRACT, @@ -438,11 +438,11 @@ multiple_threads_loaders_in_thread (guint nth_thread, peas_engine_enable_loader (engine, loader); info = peas_engine_get_plugin_info (engine, extension_plugin); - g_assert (info != NULL); + g_assert_true (info != NULL); for (i = 0; i < 10; ++i) { - g_assert (peas_engine_load_plugin (engine, info)); + g_assert_true (peas_engine_load_plugin (engine, info)); for (j = 0; j < 50; ++j) { @@ -450,11 +450,11 @@ multiple_threads_loaders_in_thread (guint nth_thread, INTROSPECTION_TYPE_BASE, NULL); - g_assert (extension != NULL); + g_assert_true (extension != NULL); g_object_unref (extension); } - g_assert (peas_engine_unload_plugin (engine, info)); + g_assert_true (peas_engine_unload_plugin (engine, info)); } testing_engine_free (engine); @@ -541,7 +541,7 @@ testing_extension_basic (const char *loader_) peas_engine_enable_loader (engine, loader); /* Check that the loaders are created lazily */ - g_assert (g_type_from_name ("PeasPluginLoader") == G_TYPE_INVALID); + g_assert_true (g_type_from_name ("PeasPluginLoader") == G_TYPE_INVALID); testing_engine_free (engine); diff --git a/tests/testing-util/testing-util.c b/tests/testing-util/testing-util.c index ab58eb9..086e450 100644 --- a/tests/testing-util/testing-util.c +++ b/tests/testing-util/testing-util.c @@ -95,7 +95,7 @@ get_log_hooks (void) if (log_hooks != NULL) return log_hooks; - g_assert (initialized); + g_assert_true (initialized); log_hooks = g_new (LogHooks, 1); log_hooks->hooks = g_ptr_array_new_with_free_func (g_free); @@ -230,12 +230,12 @@ testing_util_engine_new_full (gboolean nonglobal_loaders) { PeasEngine *engine; - g_assert (initialized); + g_assert_true (initialized); /* testing_util_engine_free() checks that the * engine is freed so only one engine can be created */ - g_assert (g_private_get (&engine_key) == NULL); + g_assert_true (g_private_get (&engine_key) == NULL); /* Must be after requiring typelibs */ if (!nonglobal_loaders) @@ -276,7 +276,7 @@ testing_util_engine_free (PeasEngine *engine) g_object_unref (engine); /* Make sure that at the end of every test the engine is freed */ - g_assert (g_private_get (&engine_key) == DEAD_ENGINE); + g_assert_true (g_private_get (&engine_key) == DEAD_ENGINE); } g_private_set (&engine_key, NULL); @@ -290,7 +290,7 @@ testing_util_run_tests (void) { int retval; - g_assert (initialized); + g_assert_true (initialized); retval = g_test_run (); -- 2.41.0 From 23db1b8dea2e79cc608dfe0fcde69373ac43ddc3 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Mon, 17 Jul 2023 14:26:43 -0700 Subject: [PATCH 2/2] tests: ensure test setup hooks don't see various defines These are checked for when initialing the test infrastructure, and even if the rest is working correctly, this needs to have the same tweaks. Fixes #32 --- tests/libpeas/testing/meson.build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/libpeas/testing/meson.build b/tests/libpeas/testing/meson.build index 9278747..4f1c66d 100644 --- a/tests/libpeas/testing/meson.build +++ b/tests/libpeas/testing/meson.build @@ -22,6 +22,8 @@ libpeas_testing_deps = [ libpeas_testing_c_args = [ '-DBUILDDIR="@0@"'.format(builddir), '-DSRCDIR="@0@"'.format(srcdir), + '-UG_DISABLE_ASSERT', + '-UG_DISABLE_CAST_CHEKCS', ] libpeas_testing_lib = library( -- 2.41.0