tests: abort if clutter_init fails

This fixes segfaults when something goes wrong during
init, but the test keeps going anyway.

Except for test-easing and test-picking, these were fixed by
sed magic:

sed -i -s -e "s/clutter_init \?(&argc, &argv)/\
if (clutter_init (\&argc, \&argv) != CLUTTER_INIT_SUCCESS)\n\
    return 1/" tests/*/*.c

http://bugzilla.clutter-project.org/show_bug.cgi?id=2574
This commit is contained in:
nobled
2011-02-22 00:19:35 +00:00
committed by Neil Roberts
parent 0d14be1aec
commit eb906d85ca
61 changed files with 132 additions and 69 deletions

View File

@ -140,7 +140,8 @@ test_script_main (int argc, char *argv[])
gchar *file;
gint res;
clutter_init (&argc, &argv);
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
return 1;
script = clutter_script_new ();
g_assert (CLUTTER_IS_SCRIPT (script));