[PATCH] tests: add missing call to g_type_init()
Ben Chan
benchan at chromium.org
Thu Feb 13 21:42:19 CET 2014
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
---
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);
--
1.9.0.rc1.175.g0b1dcb5
More information about the ModemManager-devel
mailing list