summaryrefslogtreecommitdiff
path: root/tests/at-spi2-atk/atk_test_collection.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/at-spi2-atk/atk_test_collection.c')
-rw-r--r--tests/at-spi2-atk/atk_test_collection.c38
1 files changed, 16 insertions, 22 deletions
diff --git a/tests/at-spi2-atk/atk_test_collection.c b/tests/at-spi2-atk/atk_test_collection.c
index 184a0663..5fd4d911 100644
--- a/tests/at-spi2-atk/atk_test_collection.c
+++ b/tests/at-spi2-atk/atk_test_collection.c
@@ -26,23 +26,17 @@
#define DATA_FILE TESTS_DATA_DIR "/test-collection.xml"
static void
-teardown_collection_test (gpointer fixture, gconstpointer user_data)
+atk_test_collection_get_collection_iface (TestAppFixture *fixture, gconstpointer user_data)
{
- terminate_app ();
-}
-
-static void
-atk_test_collection_get_collection_iface (gpointer fixture, gconstpointer user_data)
-{
- AtspiAccessible *obj = get_root_obj (DATA_FILE);
+ AtspiAccessible *obj = fixture->root_obj;
AtspiCollection *iface = atspi_accessible_get_collection_iface (obj);
g_assert (iface);
}
static void
-atk_test_collection_get_matches (gpointer fixture, gconstpointer user_data)
+atk_test_collection_get_matches (TestAppFixture *fixture, gconstpointer user_data)
{
- AtspiAccessible *obj = get_root_obj (DATA_FILE);
+ AtspiAccessible *obj = fixture->root_obj;
AtspiCollection *iface = atspi_accessible_get_collection_iface (obj);
g_assert (iface);
@@ -76,9 +70,9 @@ atk_test_collection_get_matches (gpointer fixture, gconstpointer user_data)
}
static void
-atk_test_collection_get_matches_to (gpointer fixture, gconstpointer user_data)
+atk_test_collection_get_matches_to (TestAppFixture *fixture, gconstpointer user_data)
{
- AtspiAccessible *obj = get_root_obj (DATA_FILE);
+ AtspiAccessible *obj = fixture->root_obj;
AtspiCollection *iface = atspi_accessible_get_collection_iface (obj);
g_assert (iface);
@@ -113,9 +107,9 @@ atk_test_collection_get_matches_to (gpointer fixture, gconstpointer user_data)
}
static void
-atk_test_collection_get_matches_from (gpointer fixture, gconstpointer user_data)
+atk_test_collection_get_matches_from (TestAppFixture *fixture, gconstpointer user_data)
{
- AtspiAccessible *obj = get_root_obj (DATA_FILE);
+ AtspiAccessible *obj = fixture->root_obj;
AtspiCollection *iface = atspi_accessible_get_collection_iface (obj);
g_assert (iface);
@@ -155,12 +149,12 @@ atk_test_collection_get_matches_from (gpointer fixture, gconstpointer user_data)
void
atk_test_collection (void)
{
- g_test_add_vtable (ATK_TEST_PATH_COLLECTION "/atk_test_collection_get_collection_iface",
- 0, NULL, NULL, atk_test_collection_get_collection_iface, teardown_collection_test);
- g_test_add_vtable (ATK_TEST_PATH_COLLECTION "/atk_test_collection_get_matches",
- 0, NULL, NULL, atk_test_collection_get_matches, teardown_collection_test);
- g_test_add_vtable (ATK_TEST_PATH_COLLECTION "/atk_test_collection_get_matches_to",
- 0, NULL, NULL, atk_test_collection_get_matches_to, teardown_collection_test);
- g_test_add_vtable (ATK_TEST_PATH_COLLECTION "/atk_test_collection_get_matches_from",
- 0, NULL, NULL, atk_test_collection_get_matches_from, teardown_collection_test);
+ g_test_add ("/collection/atk_test_collection_get_collection_iface",
+ TestAppFixture, DATA_FILE, fixture_setup, atk_test_collection_get_collection_iface, fixture_teardown);
+ g_test_add ("/collection/atk_test_collection_get_matches",
+ TestAppFixture, DATA_FILE, fixture_setup, atk_test_collection_get_matches, fixture_teardown);
+ g_test_add ("/collection/atk_test_collection_get_matches_to",
+ TestAppFixture, DATA_FILE, fixture_setup, atk_test_collection_get_matches_to, fixture_teardown);
+ g_test_add ("/collection/atk_test_collection_get_matches_from",
+ TestAppFixture, DATA_FILE, fixture_setup, atk_test_collection_get_matches_from, fixture_teardown);
}