mirror of
https://github.com/brl/mutter.git
synced 2024-12-30 14:42:14 +00:00
acff6d8196
* tests/conform/test-conform-common.c * tests/conform/test-pick.c: Instead of using clutter_stage_new /clutter_actor_destroy as a way to avoid cascading side effects between unit tests, due to left over actors, we now destroy all children of the default stage between tests instead. * tests/conform/wrapper.sh: Adds a convenience note about how to run valgrind for an individual unit test
32 lines
869 B
Plaintext
32 lines
869 B
Plaintext
|
|
How:
|
|
----
|
|
|
|
You should including the following at the top of your new unit test:
|
|
#include "test-conform-common.h"
|
|
|
|
Instead of a main () function add an entry point with a prototype as follows:
|
|
|
|
void
|
|
test_blah (TestConformSimpleFixture *fixture,
|
|
gconstpointer data)
|
|
{
|
|
|
|
}
|
|
|
|
Add a TEST_CONFORM_SIMPLE() entry in test-conform-main.c
|
|
|
|
|
|
Notes:
|
|
------
|
|
|
|
NB: A test fails if it exits. (regardless of the exit status)
|
|
|
|
Don't call clutter_init since that is handled in test-conform-common.c
|
|
|
|
Make sure you clean up *everything* you create. Noteable things you might miss
|
|
include timelines, behaviours, and all actors you add to the stage. This is important because otherwise you can cause cascading failures in other tests.
|
|
|
|
Be aware that to help avoid tests causing cascading side effects for other tests all children of the default stage are destroyed between tests.
|
|
|