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_value.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_value.c')
-rw-r--r-- | tests/at-spi2-atk/atk_test_value.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/tests/at-spi2-atk/atk_test_value.c b/tests/at-spi2-atk/atk_test_value.c index 6e9e34c9..14f45e04 100644 --- a/tests/at-spi2-atk/atk_test_value.c +++ b/tests/at-spi2-atk/atk_test_value.c @@ -24,9 +24,9 @@ #define DATA_FILE TESTS_DATA_DIR "/test-value.xml" static void -atk_test_value_get_value_iface (gpointer fixture, gconstpointer user_data) +atk_test_value_get_value_iface (TestAppFixture *fixture, gconstpointer user_data) { - AtspiAccessible *_obj = get_root_obj (DATA_FILE); + AtspiAccessible *_obj = fixture->root_obj; g_assert (_obj); AtspiAccessible *child = atspi_accessible_get_child_at_index (_obj, 0, NULL); g_assert (child); @@ -35,9 +35,9 @@ atk_test_value_get_value_iface (gpointer fixture, gconstpointer user_data) } static void -atk_test_value_get_minimum_value (gpointer fixture, gconstpointer user_data) +atk_test_value_get_minimum_value (TestAppFixture *fixture, gconstpointer user_data) { - AtspiAccessible *_obj = get_root_obj (DATA_FILE); + AtspiAccessible *_obj = fixture->root_obj; g_assert (_obj); AtspiAccessible *child = atspi_accessible_get_child_at_index (_obj, 0, NULL); g_assert (child); @@ -47,9 +47,9 @@ atk_test_value_get_minimum_value (gpointer fixture, gconstpointer user_data) } static void -atk_test_value_get_current_value (gpointer fixture, gconstpointer user_data) +atk_test_value_get_current_value (TestAppFixture *fixture, gconstpointer user_data) { - AtspiAccessible *_obj = get_root_obj (DATA_FILE); + AtspiAccessible *_obj = fixture->root_obj; g_assert (_obj); AtspiAccessible *child = atspi_accessible_get_child_at_index (_obj, 0, NULL); g_assert (child); @@ -59,9 +59,9 @@ atk_test_value_get_current_value (gpointer fixture, gconstpointer user_data) } static void -atk_test_value_get_maximum_value (gpointer fixture, gconstpointer user_data) +atk_test_value_get_maximum_value (TestAppFixture *fixture, gconstpointer user_data) { - AtspiAccessible *_obj = get_root_obj (DATA_FILE); + AtspiAccessible *_obj = fixture->root_obj; g_assert (_obj); AtspiAccessible *child = atspi_accessible_get_child_at_index (_obj, 0, NULL); g_assert (child); @@ -71,9 +71,9 @@ atk_test_value_get_maximum_value (gpointer fixture, gconstpointer user_data) } static void -atk_test_value_set_current_value (gpointer fixture, gconstpointer user_data) +atk_test_value_set_current_value (TestAppFixture *fixture, gconstpointer user_data) { - AtspiAccessible *_obj = get_root_obj (DATA_FILE); + AtspiAccessible *_obj = fixture->root_obj; g_assert (_obj); AtspiAccessible *child = atspi_accessible_get_child_at_index (_obj, 0, NULL); g_assert (child); @@ -84,9 +84,9 @@ atk_test_value_set_current_value (gpointer fixture, gconstpointer user_data) } static void -atk_test_value_get_minimum_increment (gpointer fixture, gconstpointer user_data) +atk_test_value_get_minimum_increment (TestAppFixture *fixture, gconstpointer user_data) { - AtspiAccessible *_obj = get_root_obj (DATA_FILE); + AtspiAccessible *_obj = fixture->root_obj; g_assert (_obj); AtspiAccessible *child = atspi_accessible_get_child_at_index (_obj, 0, NULL); g_assert (child); @@ -96,9 +96,9 @@ atk_test_value_get_minimum_increment (gpointer fixture, gconstpointer user_data) } static void -atk_test_value_get_text (gpointer fixture, gconstpointer user_data) +atk_test_value_get_text (TestAppFixture *fixture, gconstpointer user_data) { - AtspiAccessible *_obj = get_root_obj (DATA_FILE); + AtspiAccessible *_obj = fixture->root_obj; g_assert (_obj); AtspiAccessible *child = atspi_accessible_get_child_at_index (_obj, 0, NULL); g_assert (child); @@ -111,18 +111,18 @@ atk_test_value_get_text (gpointer fixture, gconstpointer user_data) void atk_test_value (void) { - g_test_add_vtable (ATK_TEST_PATH_VALUE "/atk_test_value_get_value_iface", - 0, NULL, NULL, atk_test_value_get_value_iface, fixture_teardown); - g_test_add_vtable (ATK_TEST_PATH_VALUE "/atk_test_value_get_minimum_value", - 0, NULL, NULL, atk_test_value_get_minimum_value, fixture_teardown); - g_test_add_vtable (ATK_TEST_PATH_VALUE "/atk_test_value_get_current_value", - 0, NULL, NULL, atk_test_value_get_current_value, fixture_teardown); - g_test_add_vtable (ATK_TEST_PATH_VALUE "/atk_test_value_get_maximum_value", - 0, NULL, NULL, atk_test_value_get_maximum_value, fixture_teardown); - g_test_add_vtable (ATK_TEST_PATH_VALUE "/atk_test_value_set_current_value", - 0, NULL, NULL, atk_test_value_set_current_value, fixture_teardown); - g_test_add_vtable (ATK_TEST_PATH_VALUE "/atk_test_value_get_minimum_increment", - 0, NULL, NULL, atk_test_value_get_minimum_increment, fixture_teardown); - g_test_add_vtable (ATK_TEST_PATH_VALUE "/atk_test_value_get_text", - 0, NULL, NULL, atk_test_value_get_text, fixture_teardown); + g_test_add (ATK_TEST_PATH_VALUE "/atk_test_value_get_value_iface", + TestAppFixture, DATA_FILE, fixture_setup, atk_test_value_get_value_iface, fixture_teardown); + g_test_add (ATK_TEST_PATH_VALUE "/atk_test_value_get_minimum_value", + TestAppFixture, DATA_FILE, fixture_setup, atk_test_value_get_minimum_value, fixture_teardown); + g_test_add (ATK_TEST_PATH_VALUE "/atk_test_value_get_current_value", + TestAppFixture, DATA_FILE, fixture_setup, atk_test_value_get_current_value, fixture_teardown); + g_test_add (ATK_TEST_PATH_VALUE "/atk_test_value_get_maximum_value", + TestAppFixture, DATA_FILE, fixture_setup, atk_test_value_get_maximum_value, fixture_teardown); + g_test_add (ATK_TEST_PATH_VALUE "/atk_test_value_set_current_value", + TestAppFixture, DATA_FILE, fixture_setup, atk_test_value_set_current_value, fixture_teardown); + g_test_add (ATK_TEST_PATH_VALUE "/atk_test_value_get_minimum_increment", + TestAppFixture, DATA_FILE, fixture_setup, atk_test_value_get_minimum_increment, fixture_teardown); + g_test_add (ATK_TEST_PATH_VALUE "/atk_test_value_get_text", + TestAppFixture, DATA_FILE, fixture_setup, atk_test_value_get_text, fixture_teardown); } |