2 * Tested interface: AtkObject
4 * Tested AtkObject: EailDayselector
6 * Description: Test AtkObject interface
8 * Test input: accessible object representing EailDayselector
10 * Expected test result: test should return 0 (success)
13 #include <Elementary.h>
16 #include "eail_test_utils.h"
18 #define EAIL_TYPE_FOR_DAY_SELECTOR "EailDayselector"
19 #define EAIL_TYPE_FOR_CHECK "EailCheck"
21 INIT_TEST("EailDayselector")
24 _do_test(AtkObject *obj)
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 child_count = atk_object_get_n_accessible_children(obj);
36 g_assert(child_count == 7);
38 /* all fields have to be CHECK type*/
39 for (i = 0; i < child_count; i++)
41 AtkObject *child = atk_object_ref_accessible_child(obj, i);
42 g_assert(ATK_IS_OBJECT(child));
43 g_assert(eailu_is_object_with_type(child, EAIL_TYPE_FOR_CHECK));
45 g_object_unref(child);
48 eailu_test_atk_focus(obj, TRUE);
50 eailu_test_code_called = 1;
54 _init_dayselector(Evas_Object *win)
56 Evas_Object *dayselector, *box;
58 box = elm_box_add(win);
59 evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
60 elm_win_resize_object_add(win, box);
61 evas_object_show(box);
63 dayselector = elm_dayselector_add(win);
64 evas_object_size_hint_weight_set(dayselector, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
65 evas_object_size_hint_align_set(dayselector, EVAS_HINT_FILL, 0.5);
67 elm_box_pack_end(box, dayselector);
68 evas_object_show(dayselector);
72 elm_main(int argc, char **argv)
76 win = eailu_create_test_window_with_glib_init(_on_done, _on_focus_in);
77 _init_dayselector(win);
79 evas_object_show(win);