2 * Tested interface: AtkObject
4 * Tested AtkObject: EailLabel
6 * Description: Test AtkObject interface
8 * Test input: accessible object representing EailLabel
10 * Expected test result: test should return 0 (success)
13 #include <Elementary.h>
15 #include "eail_test_utils.h"
17 INIT_TEST("EailLabel")
20 _init_label(Evas_Object *win)
22 Evas_Object *bg, *label;
25 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
26 elm_win_resize_object_add(win, bg);
29 label = elm_label_add(win);
30 elm_object_text_set(label, "Lorem ipsum dolor sit amet, consectetur adipisicing elit,"
31 "sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
32 "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris"
33 "nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in"
34 "reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla"
35 "pariatur. Excepteur sint occaecat cupidatat non proident, sunt"
36 "in culpa qui officia deserunt mollit anim id est laborum.");
37 elm_label_line_wrap_set(label, ELM_WRAP_WORD);
38 evas_object_resize(label, 200, 170);
39 evas_object_move(label, 0, 0);
40 evas_object_show(label);
42 evas_object_resize(win, 200, 320);
46 _do_test(AtkObject *obj)
48 AtkStateSet *state_set = atk_object_ref_state_set(obj);
50 g_assert(ATK_IS_OBJECT(obj));
51 atk_object_set_description(obj, "test");
52 g_assert_cmpstr(atk_object_get_description(obj), ==, "test");
54 atk_object_set_name(obj, "test name");
55 g_assert_cmpstr(atk_object_get_name(obj), ==, "test name");
57 g_assert(atk_object_get_role(obj) == ATK_ROLE_LABEL);
59 g_assert(atk_state_set_contains_state(state_set, ATK_STATE_MULTI_LINE));
60 g_object_unref(state_set);
62 eailu_test_code_called = 1;
66 elm_main(int argc, char **argv)
70 win = eailu_create_test_window_with_glib_init(_on_done, _on_focus_in);
74 evas_object_show(win);