1
0
Fork 0
Commit graph

8 commits

Author SHA1 Message Date
Emmanuele Bassi
cb3999744f Remove usage of clutter_group_add()
The macro is there for mallum eyes only.
2011-06-16 17:07:32 +01:00
Emmanuele Bassi
d032b9b2bf conform: Start cleaning up the conformance test suite
Re-order the units into a sensible list, with basic tests at the
beginning, and per-class tests at the end - with Cogl last.

Also, start renaming the unit functions from test_<foo> to <foo>,
so that the executable wrappers and the reports have sensible names.
2010-10-12 17:42:18 +01:00
Emmanuele Bassi
b5d5b9628e conform: Implement TEST_CONFORM_TODO() correctly
The TODO() macro for adding new tests to the test suite has always meant
to be implemented like the TODO block in Test::More, i.e. a test that is
assumed to fail, and which warns if it unexpectedly succeeds.

Since GTest lacks the expressivity of Test::More, the implementation
just verifies that the tests marked as TODO actually fail, and will fail
if they happen to succeed - at which point the developer will have to
change the macro to SIMPLE or SKIP.
2010-10-12 17:11:52 +01:00
Neil Roberts
d0cab85673 Add a conformance test for clutter_actor_contains
This adds a conformance test for clutter_actor_contains to assert that
it gets the expected results for the given tree of actors.
2010-09-28 15:21:49 +01:00
Emmanuele Bassi
3a9d842164 conformance: Show the Stage to test invariants
We need to make the Stage set the MAPPED flag on itself if we want to
verify the MAPPED state. That was always the case - it just worked
before because the Stage was shown at least once.
2010-02-24 12:25:48 +00:00
Emmanuele Bassi
abac520f0c [tests] Add unit for Clone behaviour
A clone actor should not modify the state of its source, so we need
to check that it's not breaking any invariant.
2009-06-15 11:29:37 +01:00
Havoc Pennington
125bded814 Enforce invariants on mapped, realized, visibility states
Bug 1138 - No trackable "mapped" state

* Add a VISIBLE flag tracking application programmer's
  expected showing-state for the actor, allowing us to
  always ensure we keep what the app wants while tracking
  internal implementation state separately.

* Make MAPPED reflect whether the actor will be painted;
  add notification on a ClutterActor::mapped property.
  Keep MAPPED state updated as the actor is shown,
  ancestors are shown, actor is reparented, etc.

* Require a stage and realized parents to realize; this means
  at realization time the correct window system and GL resources
  are known. But unparented actors can no longer be realized.

* Allow children to be unrealized even if parent is realized.
  Otherwise in effect either all actors or no actors are realized,
  i.e. it becomes a stage-global flag.

* Allow clutter_actor_realize() to "fail" if not inside a toplevel

* Rework clutter_actor_unrealize() so internally we have
  a flavor that does not mess with visibility flag

* Add _clutter_actor_rerealize() to encapsulate a somewhat
  tricky operation we were doing in a couple of places

* Do not realize/unrealize children in ClutterGroup,
  ClutterActor already does it

* Do not realize impl by hand in clutter_stage_show(),
  since showing impl already does that

* Do not unrealize in various dispose() methods, since
  ClutterActor dispose implementation already does it
  and chaining up is mandatory

* ClutterTexture uses COGL while unrealizable (before it's
  added to a stage). Previously this breakage was affecting
  ClutterActor because we had to allow realize outside
  a stage. Move the breakage to ClutterTexture, by making
  ClutterTexture just use COGL while not realized.

* Unrealize before we set parent to NULL in clutter_actor_unparent().
  This means unrealize() implementations can get to the stage.
  Because actors need the stage in order to detach from stage.

* Update clutter-actor-invariants.txt to reflect latest changes

* Remove explicit hide/unrealize from ClutterActor::dispose since
  unparent already forces those
  Instead just assert that unparent() occurred and did the right thing.

* Check whether parent implements unrealize before chaining up
  Needed because ClutterGroup no longer has to implement unrealize.

* Perform unrealize in the default handler for the signal.
  This allows non-containers that have children to work properly,
  and allows containers to override how it's done.

* Add map/unmap virtual methods and set MAPPED flag on self and
  children in there. This allows subclasses to hook map/unmap.
  These are not signals, because notify::mapped is better for
  anything it's legitimate for a non-subclass to do.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2009-04-24 15:27:19 +01:00
Emmanuele Bassi
d4573ba10c 2008-11-08 Emmanuele Bassi <ebassi@linux.intel.com>
* tests/conform/Makefile.am:
	* tests/conform/test-actor-invariants.c:
	* tests/conform/test-conform-main.c: Move the actor invariants
	unit to the conform section of the test suite.

	* tests/interactive/Makefile.am:
	* tests/interactive/test-entry-auto.c:
	* tests/interactive/test-invariants.c: Remove the entry-auto
	and invariants test, since those two belong to the conform
	section.
2008-11-08 15:56:22 +00:00
Renamed from tests/interactive/test-invariants.c (Browse further)