mutter/tests/conform/test-conform-common.h
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

34 lines
1011 B
C

/* Stuff you put in here is setup once in main() and gets passed around to
* all test functions and fixture setup/teardown functions in the data
* argument */
typedef struct _TestConformSharedState
{
int *argc_addr;
char ***argv_addr;
} TestConformSharedState;
/* This fixture structure is allocated by glib, and before running each test
* the test_conform_simple_fixture_setup func (see below) is called to
* initialise it, and test_conform_simple_fixture_teardown is called when
* the test is finished. */
typedef struct _TestConformSimpleFixture
{
/**/
int dummy;
} TestConformSimpleFixture;
typedef struct _TestConformTodo
{
gchar *name;
void (* func) (TestConformSimpleFixture *, gconstpointer);
} TestConformTodo;
void test_conform_simple_fixture_setup (TestConformSimpleFixture *fixture,
gconstpointer data);
void test_conform_simple_fixture_teardown (TestConformSimpleFixture *fixture,
gconstpointer data);
gchar *clutter_test_get_data_file (const gchar *filename);