2013-06-12 05:01:50 -04:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#include <clutter/clutter.h>
|
|
|
|
|
2013-12-12 09:51:00 -05:00
|
|
|
static void
|
|
|
|
actor_meta_clear (void)
|
2013-06-12 05:01:50 -04:00
|
|
|
{
|
|
|
|
ClutterActor *actor, *stage;
|
|
|
|
|
2013-12-12 09:51:00 -05:00
|
|
|
stage = clutter_test_get_stage ();
|
2013-06-12 05:01:50 -04:00
|
|
|
|
|
|
|
actor = clutter_actor_new ();
|
|
|
|
g_object_ref_sink (actor);
|
|
|
|
g_object_add_weak_pointer (G_OBJECT (actor), (gpointer *) &actor);
|
|
|
|
|
|
|
|
clutter_actor_add_action (actor, clutter_click_action_new ());
|
|
|
|
clutter_actor_add_constraint (actor, clutter_bind_constraint_new (stage, CLUTTER_BIND_ALL, 0));
|
|
|
|
clutter_actor_add_effect (actor, clutter_blur_effect_new ());
|
|
|
|
|
|
|
|
g_assert (clutter_actor_has_actions (actor));
|
|
|
|
g_assert (clutter_actor_has_constraints (actor));
|
|
|
|
g_assert (clutter_actor_has_effects (actor));
|
|
|
|
|
|
|
|
clutter_actor_clear_actions (actor);
|
|
|
|
g_assert (!clutter_actor_has_actions (actor));
|
|
|
|
|
|
|
|
clutter_actor_clear_constraints (actor);
|
|
|
|
g_assert (!clutter_actor_has_constraints (actor));
|
|
|
|
|
|
|
|
clutter_actor_clear_effects (actor);
|
|
|
|
g_assert (!clutter_actor_has_effects (actor));
|
|
|
|
|
|
|
|
clutter_actor_destroy (actor);
|
|
|
|
g_assert (actor == NULL);
|
|
|
|
}
|
2013-12-12 09:51:00 -05:00
|
|
|
|
|
|
|
CLUTTER_TEST_SUITE (
|
|
|
|
CLUTTER_TEST_UNIT ("/actor/meta/clear", actor_meta_clear)
|
|
|
|
)
|