[PATCH] tests: add missing call to g_type_init()

Aleksander Morgado aleksander at aleksander.es
Fri Feb 14 09:06:17 CET 2014


On 13/02/14 21:42, Ben Chan wrote:
> This patches fixes the following error when testing ModemManager with
> glib < 2.36, which still requires g_type_init() to be called:
> 
> TEST: test-service-generic... (pid=20166)
>   /MM/Service/Generic:
> (/work/ModemManager/plugins/.libs/lt-test-service-generic:20166): GLib-GObject-CRITICAL **: gtype.c:2720: You forgot to call g_type_init()
> FAIL
> ---

Pushed, thanks.

>  plugins/generic/tests/test-service-generic.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/plugins/generic/tests/test-service-generic.c b/plugins/generic/tests/test-service-generic.c
> index 7ab3887..44164df 100644
> --- a/plugins/generic/tests/test-service-generic.c
> +++ b/plugins/generic/tests/test-service-generic.c
> @@ -76,6 +76,7 @@ test_something (TestFixture *fixture)
>  int main (int   argc,
>            char *argv[])
>  {
> +    g_type_init ();
>      g_test_init (&argc, &argv, NULL);
>  
>      TEST_ADD ("/MM/Service/Generic", test_something);
> 


-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list