diff --git a/tests/conform/Makefile.am b/tests/conform/Makefile.am index 93572c114..0be0f8986 100644 --- a/tests/conform/Makefile.am +++ b/tests/conform/Makefile.am @@ -54,6 +54,7 @@ units_sources += \ actor-invariants.c \ actor-iter.c \ actor-layout.c \ + actor-meta.c \ actor-offscreen-redirect.c \ actor-offscreen-limit-max-size.c\ actor-paint-opacity.c \ diff --git a/tests/conform/actor-meta.c b/tests/conform/actor-meta.c new file mode 100644 index 000000000..5cae53a27 --- /dev/null +++ b/tests/conform/actor-meta.c @@ -0,0 +1,41 @@ +#include +#include + +#include + +#include "test-conform-common.h" + +void +actor_meta_clear (TestConformSimpleFixture *fixture G_GNUC_UNUSED, + gconstpointer data G_GNUC_UNUSED) +{ + ClutterActor *actor, *stage; + + stage = clutter_stage_new (); + + 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); + + clutter_actor_destroy (stage); +} diff --git a/tests/conform/test-conform-main.c b/tests/conform/test-conform-main.c index e0a9b6a94..cc5908d56 100644 --- a/tests/conform/test-conform-main.c +++ b/tests/conform/test-conform-main.c @@ -165,6 +165,8 @@ main (int argc, char **argv) TEST_CONFORM_SIMPLE ("/actor/invariants", default_stage); TEST_CONFORM_SIMPLE ("/actor/invariants", actor_pivot_transformation); + TEST_CONFORM_SIMPLE ("/actor/meta", actor_meta_clear); + TEST_CONFORM_SIMPLE ("/actor/opacity", opacity_label); TEST_CONFORM_SIMPLE ("/actor/opacity", opacity_rectangle); TEST_CONFORM_SIMPLE ("/actor/opacity", opacity_paint);