2 * Tested interface: AtkObject
4 * Tested AtkObject: EailFlipselector
6 * Description: Test AtkObject interface
8 * Test input: accessible object representing EailFlipselector
10 * Expected test result: test should return 0 (success)
13 #include <Elementary.h>
16 #include "eail_test_utils.h"
20 INIT_TEST("EailFlipselector")
23 _init_flipselector(Evas_Object *win)
26 Evas_Object *bg, *bx, *fp;
27 static const char *lbl[] =
40 elm_win_resize_object_add(win, bg);
41 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
44 bx = elm_box_add(win);
45 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
46 elm_win_resize_object_add(win, bx);
49 fp = elm_flipselector_add(win);
50 evas_object_size_hint_weight_set(fp, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
52 for (i = 0; i < sizeof(lbl) / sizeof(lbl[0]); i++)
53 elm_flipselector_item_append(fp, lbl[i], NULL, NULL);
55 elm_box_pack_end(bx, fp);
60 _do_test(AtkObject *obj)
62 g_assert(ATK_IS_OBJECT(obj));
64 atk_object_set_description(obj, "test");
65 g_assert_cmpstr(atk_object_get_description(obj), ==, "test");
67 atk_object_set_name(obj, "test name");
68 g_assert_cmpstr(atk_object_get_name(obj), ==, "test name");
70 g_assert(atk_object_get_n_accessible_children(obj) == ITEMS_COUNT);
72 g_assert(atk_object_get_role(obj) == ATK_ROLE_LIST);
74 eailu_test_code_called = 1;
78 elm_main(int argc, char **argv)
80 Evas_Object *win = NULL;
82 win = eailu_create_test_window_with_glib_init(_on_done, _on_focus_in);
83 _init_flipselector(win);
84 evas_object_show(win);