2 * Tested interface: AtkObject
4 * Tested AtkObject: EailCalendar
6 * Description: Test AtkObject interface
8 * Test input: accessible object representing EailCalendar
10 * Expected test result: test should return 0 (success)
13 #include <Elementary.h>
17 #include "eail_test_utils.h"
19 INIT_TEST("EailCalendar")
21 static int year_limit_min = 2000;
22 static int year_limit_max = 2030;
25 _init_calendar(Evas_Object *win)
27 Evas_Object *bg, *cal;
30 elm_win_resize_object_add(win, bg);
31 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
34 cal = elm_calendar_add(win);
35 elm_calendar_min_max_year_set(cal, year_limit_min, year_limit_max);
36 elm_win_resize_object_add(win, cal);
37 evas_object_size_hint_weight_set(cal, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
38 evas_object_show(cal);
42 _do_test(AtkObject *obj)
44 g_assert(atk_object_get_role(obj) == ATK_ROLE_CALENDAR);
46 atk_object_set_name(obj, "cal");
47 g_assert_cmpstr(atk_object_get_name(obj), ==, "cal");
48 atk_object_set_description(obj, "test");
49 g_assert_cmpstr(atk_object_get_description(obj), ==, "test");
51 atk_object_set_name(obj, "test name");
52 g_assert_cmpstr(atk_object_get_name(obj), ==, "test name");
54 /* calendar object to support focus */
55 eailu_test_atk_focus(obj, TRUE);
57 eailu_test_code_called = 1;
61 elm_main(int argc, char **argv)
65 win = eailu_create_test_window_with_glib_init(_on_done, _on_focus_in);
68 evas_object_show(win);