[mutter] unit-tests: Print error when configuring context
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] unit-tests: Print error when configuring context
- Date: Sun, 19 Dec 2021 16:20:09 +0000 (UTC)
commit a1d5c96e86f672c2252b95d1e4765f2931f582b6
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Tue Sep 7 10:32:08 2021 +0200
unit-tests: Print error when configuring context
More helpful than an assert.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1993>
src/tests/unit-tests.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/tests/unit-tests.c b/src/tests/unit-tests.c
index 0dba16535c..dfad2bdc70 100644
--- a/src/tests/unit-tests.c
+++ b/src/tests/unit-tests.c
@@ -239,10 +239,12 @@ int
main (int argc, char *argv[])
{
g_autoptr (MetaContext) context = NULL;
+ g_autoptr (GError) error = NULL;
context = meta_create_test_context (META_CONTEXT_TEST_TYPE_NESTED,
META_CONTEXT_TEST_FLAG_TEST_CLIENT);
- g_assert (meta_context_configure (context, &argc, &argv, NULL));
+ if (!meta_context_configure (context, &argc, &argv, &error))
+ g_error ("Failed to configure test context: %s", error->message);
test_context = context;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]