mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
tests: Add unit for Animation definitions
Verify that an Animation can be defined using ClutterScript. No initial/final state of the animation, yet.
This commit is contained in:
@ -256,3 +256,25 @@ test_script_object_property (TestConformSimpleFixture *fixture,
|
||||
clutter_actor_destroy (CLUTTER_ACTOR (actor));
|
||||
g_free (test_file);
|
||||
}
|
||||
|
||||
void
|
||||
test_script_animation (TestConformSimpleFixture *fixture,
|
||||
gconstpointer dummy)
|
||||
{
|
||||
ClutterScript *script = clutter_script_new ();
|
||||
GObject *animation = NULL;
|
||||
GError *error = NULL;
|
||||
gchar *test_file;
|
||||
|
||||
test_file = clutter_test_get_data_file ("test-script-animation.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);
|
||||
|
||||
animation = clutter_script_get_object (script, "test");
|
||||
g_assert (CLUTTER_IS_ANIMATION (animation));
|
||||
|
||||
g_object_unref (script);
|
||||
g_free (test_file);
|
||||
}
|
||||
|
Reference in New Issue
Block a user