mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 08:30:42 -05:00
98f942fd72
* tests/conform/wrapper.sh: * tests/conform/test-conform-main.c: * tests/conform/test-timeline.c: Adds Neil's updates to test-timeline.c so it now works with the new unit testing infrastructure. Also some fixes to ensure wrappers get setup correctly for the timeline tests. * tests/interactive/test-main.c: cast the symbol return pointer as (gpointer *) to avoid warning * tests/conform/test-pick.c: g_assert that the test passes, instead of using exit() * test/conform/ADDING_NEW_TESTS: Fixes a silly typo
32 lines
842 B
Plaintext
32 lines
842 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.
|
|
|
|
Use stage = clutter_stage_new () with a corresponding clutter_actor_destroy instead of clutter_stage_get_default ().
|
|
|