diff options
author | Federico Mena Quintero <federico@gnome.org> | 2022-09-07 20:48:09 -0500 |
---|---|---|
committer | Federico Mena Quintero <federico@gnome.org> | 2023-05-09 10:04:23 -0600 |
commit | 54996d2e517185f1d36deb8a47edb86a14dc09f6 (patch) | |
tree | 2c557faa78a56da96cf11df7a7c1fde78a5fc297 /tests/at-spi2-atk/atk_test_document.c | |
parent | 74968d2ced63e0ed12890a12ec41255c24bcc2a0 (diff) | |
download | at-spi2-core-54996d2e517185f1d36deb8a47edb86a14dc09f6.tar.gz |
Switch all at-spi2-atk tests to g_test_add() with a TestAppFixture
Diffstat (limited to 'tests/at-spi2-atk/atk_test_document.c')
-rw-r--r-- | tests/at-spi2-atk/atk_test_document.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/tests/at-spi2-atk/atk_test_document.c b/tests/at-spi2-atk/atk_test_document.c index 7e020709..6f750e63 100644 --- a/tests/at-spi2-atk/atk_test_document.c +++ b/tests/at-spi2-atk/atk_test_document.c @@ -1,6 +1,6 @@ /* - * AT-SPI - Assistive Technology Service Provider Interface - * (Gnome Accessibility Project; https://wiki.gnome.org/Accessibility) + * AT-SPI - Assistive Service Provider Interface + * (Gnome AccessibiliTestAppFixture, DATA_FILE, fixture_setup://wiki.gnome.org/Accessibility) * * Copyright (c) 2014 Samsung Electronics Co., Ltd. * @@ -26,18 +26,18 @@ #define DATA_FILE TESTS_DATA_DIR "/test-document.xml" static void -atk_test_document_get_document_iface (gpointer fixture, gconstpointer user_data) +atk_test_document_get_document_iface (TestAppFixture *fixture, gconstpointer user_data) { - AtspiAccessible *obj = get_root_obj (DATA_FILE); + AtspiAccessible *obj = fixture->root_obj; AtspiAccessible *child = atspi_accessible_get_child_at_index (obj, 1, NULL); AtspiDocument *iface = atspi_accessible_get_document_iface (child); g_assert (iface != NULL); } static void -atk_test_document_get_locale (gpointer fixture, gconstpointer user_data) +atk_test_document_get_locale (TestAppFixture *fixture, gconstpointer user_data) { - AtspiAccessible *obj = get_root_obj (DATA_FILE); + AtspiAccessible *obj = fixture->root_obj; AtspiAccessible *child = atspi_accessible_get_child_at_index (obj, 1, NULL); AtspiDocument *iface = atspi_accessible_get_document_iface (child); g_assert (iface != NULL); @@ -46,9 +46,9 @@ atk_test_document_get_locale (gpointer fixture, gconstpointer user_data) } static void -atk_test_document_get_attribute_value (gpointer fixture, gconstpointer user_data) +atk_test_document_get_attribute_value (TestAppFixture *fixture, gconstpointer user_data) { - AtspiAccessible *obj = get_root_obj (DATA_FILE); + AtspiAccessible *obj = fixture->root_obj; AtspiAccessible *child = atspi_accessible_get_child_at_index (obj, 1, NULL); AtspiDocument *iface = atspi_accessible_get_document_iface (child); g_assert (iface != NULL); @@ -58,9 +58,9 @@ atk_test_document_get_attribute_value (gpointer fixture, gconstpointer user_data } static void -atk_test_document_get_attributes (gpointer fixture, gconstpointer user_data) +atk_test_document_get_attributes (TestAppFixture *fixture, gconstpointer user_data) { - AtspiAccessible *obj = get_root_obj (DATA_FILE); + AtspiAccessible *obj = fixture->root_obj; AtspiAccessible *child = atspi_accessible_get_child_at_index (obj, 1, NULL); AtspiDocument *iface = atspi_accessible_get_document_iface (child); g_assert (iface != NULL); @@ -93,12 +93,12 @@ atk_test_document_get_attributes (gpointer fixture, gconstpointer user_data) void atk_test_document (void) { - g_test_add_vtable (ATK_TEST_PATH_ACCESSIBLE "/atk_test_document_get_document_iface", - 0, NULL, NULL, atk_test_document_get_document_iface, fixture_teardown); - g_test_add_vtable (ATK_TEST_PATH_ACCESSIBLE "/atk_test_document_get_locale", - 0, NULL, NULL, atk_test_document_get_locale, fixture_teardown); - g_test_add_vtable (ATK_TEST_PATH_ACCESSIBLE "/atk_test_document_get_attribute_value", - 0, NULL, NULL, atk_test_document_get_attribute_value, fixture_teardown); - g_test_add_vtable (ATK_TEST_PATH_ACCESSIBLE "/atk_test_document_get_attributes", - 0, NULL, NULL, atk_test_document_get_attributes, fixture_teardown); + g_test_add (ATK_TEST_PATH_ACCESSIBLE "/atk_test_document_get_document_iface", + TestAppFixture, DATA_FILE, fixture_setup, atk_test_document_get_document_iface, fixture_teardown); + g_test_add (ATK_TEST_PATH_ACCESSIBLE "/atk_test_document_get_locale", + TestAppFixture, DATA_FILE, fixture_setup, atk_test_document_get_locale, fixture_teardown); + g_test_add (ATK_TEST_PATH_ACCESSIBLE "/atk_test_document_get_attribute_value", + TestAppFixture, DATA_FILE, fixture_setup, atk_test_document_get_attribute_value, fixture_teardown); + g_test_add (ATK_TEST_PATH_ACCESSIBLE "/atk_test_document_get_attributes", + TestAppFixture, DATA_FILE, fixture_setup, atk_test_document_get_attributes, fixture_teardown); } |