unit-tests: Print error when configuring context
More helpful than an assert. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1993>
This commit is contained in:
parent
d8521ffc56
commit
a1d5c96e86
@ -239,10 +239,12 @@ int
|
|||||||
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
g_autoptr (MetaContext) context = NULL;
|
g_autoptr (MetaContext) context = NULL;
|
||||||
|
g_autoptr (GError) error = NULL;
|
||||||
|
|
||||||
context = meta_create_test_context (META_CONTEXT_TEST_TYPE_NESTED,
|
context = meta_create_test_context (META_CONTEXT_TEST_TYPE_NESTED,
|
||||||
META_CONTEXT_TEST_FLAG_TEST_CLIENT);
|
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;
|
test_context = context;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user