mirror of
https://github.com/brl/mutter.git
synced 2024-11-11 00:26:40 -05:00
7d891d9dd4
The units under the conformance test suite should be able to use external files. Linking the files in tests/conform like the interactive tests do seems like a hack piled on top of a hack, so instead we should provide a programmatic way for a conformance test unit to get the full path of a file, regardless of where the tests/data directory is. We can use a define to get the full path of tests/data and then a function using g_build_filename() to construct the path to the file we want.
28 lines
881 B
C
28 lines
881 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;
|
|
|
|
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);
|