mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
tests: Print out parser errors if present
If the conformance test for the Script parser throws an error and we've enabled verbosity then we should print out the error message before aborting.
This commit is contained in:
parent
9bae553564
commit
95b55588ad
@ -127,8 +127,8 @@ test_script_child (TestConformSimpleFixture *fixture,
|
||||
|
||||
test_file = clutter_test_get_data_file ("test-script-child.json");
|
||||
clutter_script_load_from_file (script, test_file, &error);
|
||||
if (g_test_verbose () && (error != NULL))
|
||||
g_warning ("Unable to load '%s': %s", test_file, error->message);
|
||||
if (g_test_verbose () && error)
|
||||
g_print ("Error: %s", error->message);
|
||||
g_assert (error == NULL);
|
||||
|
||||
container = actor = NULL;
|
||||
@ -174,6 +174,8 @@ test_script_single (TestConformSimpleFixture *fixture,
|
||||
|
||||
test_file = clutter_test_get_data_file ("test-script-single.json");
|
||||
clutter_script_load_from_file (script, test_file, &error);
|
||||
if (g_test_verbose () && error)
|
||||
g_print ("Error: %s", error->message);
|
||||
g_assert (error == NULL);
|
||||
|
||||
actor = clutter_script_get_object (script, "test");
|
||||
@ -207,6 +209,8 @@ test_script_implicit_alpha (TestConformSimpleFixture *fixture,
|
||||
|
||||
test_file = clutter_test_get_data_file ("test-script-implicit-alpha.json");
|
||||
clutter_script_load_from_file (script, test_file, &error);
|
||||
if (g_test_verbose () && error)
|
||||
g_print ("Error: %s", error->message);
|
||||
g_assert (error == NULL);
|
||||
|
||||
behaviour = clutter_script_get_object (script, "test");
|
||||
@ -238,6 +242,8 @@ test_script_object_property (TestConformSimpleFixture *fixture,
|
||||
|
||||
test_file = clutter_test_get_data_file ("test-script-object-property.json");
|
||||
clutter_script_load_from_file (script, test_file, &error);
|
||||
if (g_test_verbose () && error)
|
||||
g_print ("Error: %s", error->message);
|
||||
g_assert (error == NULL);
|
||||
|
||||
actor = clutter_script_get_object (script, "test");
|
||||
|
Loading…
Reference in New Issue
Block a user