2 * Tested interface: AtkObject
4 * Tested AtkObject: EailEntry
6 * Description: Test AtkObject interface
8 * Test input: accessible object representing EailEntry
10 * Expected test result: test should return 0 (success)
13 #include <Elementary.h>
15 #include "eail_test_utils.h"
17 INIT_TEST("EailEntry")
20 _do_test(AtkObject *obj)
23 AtkStateSet *state_set;
24 const char *type_name = g_type_name(G_TYPE_FROM_INSTANCE(obj));
26 g_assert(ATK_IS_OBJECT(obj));
27 g_assert_cmpstr(type_name, ==, "EailEntry");
29 atk_object_set_description(obj, "test");
30 g_assert_cmpstr(atk_object_get_description(obj), ==, "test");
32 atk_object_set_name(obj, "test name");
33 g_assert_cmpstr(atk_object_get_name(obj), ==, "test name");
35 role = atk_object_get_role(obj);
36 g_assert(role == ATK_ROLE_ENTRY);
37 state_set = atk_object_ref_state_set(obj);
38 g_assert(atk_state_set_contains_state(state_set, ATK_STATE_MULTI_LINE));
39 g_object_unref(state_set);
41 eailu_test_code_called = 1;
45 _init_entry(Evas_Object *win)
47 Evas_Object *box, *tb, *bg, *en;
49 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
50 elm_win_autodel_set(win, EINA_TRUE);
53 elm_win_resize_object_add(win, bg);
54 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
57 box = elm_box_add(win);
58 evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
59 elm_win_resize_object_add(win, box);
60 evas_object_show(box);
62 tb = elm_box_add(win);
63 elm_box_horizontal_set(tb, EINA_TRUE);
64 evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, 0.0);
65 evas_object_size_hint_weight_set(tb, EVAS_HINT_FILL, EVAS_HINT_FILL);
66 elm_box_pack_end(box, tb);
69 en = elm_entry_add(win);
70 elm_entry_line_wrap_set(en, ELM_WRAP_WORD);
71 evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
72 evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);
73 elm_box_pack_end(box, en);
76 evas_object_resize(win, 200, 300);
80 elm_main(int argc, char *argv[])
84 win = eailu_create_test_window_with_glib_init(_on_done, _on_focus_in);
86 evas_object_show(win);