diff options
author | Christoph Reiter <reiter.christoph@gmail.com> | 2019-10-19 19:14:05 +0200 |
---|---|---|
committer | Christoph Reiter <reiter.christoph@gmail.com> | 2019-10-19 17:17:27 +0000 |
commit | dac56824a64bcb300bc86175dee7d13e67bed09c (patch) | |
tree | 8e809aa192f84232872215a5264fff9f75a39f7f | |
parent | 7206310fcd638c81d3c55af46ac5c11c8e3544a7 (diff) | |
download | gobject-introspection-dac56824a64bcb300bc86175dee7d13e67bed09c.tar.gz |
gitypelibtest: make tests fail if the library can't be found
Check that g_object_info_get_ref_function_pointer() actually returns something,
which it doesn't if the shared lib isn't found.
In case a shared lib isn't found g-i will emit a warning, so also make sure
we fail on warnings to avoid similar problems in the future.
-rw-r--r-- | tests/repository/gitypelibtest.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/repository/gitypelibtest.c b/tests/repository/gitypelibtest.c index 6620f1ea..c0398d97 100644 --- a/tests/repository/gitypelibtest.c +++ b/tests/repository/gitypelibtest.c @@ -163,7 +163,7 @@ test_fundamental_get_ref_function_pointer (GIRepository * repo) g_assert (g_irepository_require (repo, "Regress", NULL, 0, NULL)); info = g_irepository_find_by_name (repo, "Regress", "TestFundamentalObject"); - g_object_info_get_ref_function_pointer (info); + g_assert_nonnull (g_object_info_get_ref_function_pointer (info)); g_base_info_unref (info); } @@ -308,6 +308,8 @@ main (int argc, char **argv) { GIRepository *repo; + g_log_set_always_fatal (G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL); + repo = g_irepository_get_default (); /* do tests */ |