Merge "custom eail widget implementation" into tizen
[platform/core/uifw/eail.git] / tests / eail_route_tc2.c
1 /*
2  * Tested interface: AtkValue
3  *
4  * Tested AtkObject: EailRoute
5  *
6  * Description: Test AtkValue interface
7  *
8  * Test input: accessible object representing EailRoute
9  *
10  * Expected test result: test should return 0 (success)
11  */
12
13 #include <Elementary.h>
14 #include <atk/atk.h>
15
16 #include "eail_test_utils.h"
17
18 INIT_TEST("EailRoute")
19
20 static void
21 _init_route(Evas_Object *win)
22 {
23    Evas_Object *bg;
24
25    bg = elm_bg_add(win);
26    elm_win_resize_object_add(win, bg);
27    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
28    evas_object_show(bg);
29
30    elm_route_add(win);
31 }
32
33 static void
34 _do_test(AtkObject *obj)
35 {
36    g_assert(ATK_IS_VALUE(obj));
37
38    GValue value = G_VALUE_INIT;
39    atk_value_get_current_value(ATK_VALUE(obj), &value);
40    _printf("atk_value_get_current_value:\n%s\n", g_value_get_string(&value));
41
42    g_assert_cmpstr(g_value_get_string(&value), ==,
43                    "<longitude><min>0.000000</min><max>0.000000</max></longitude>\n"
44                    "<latitude><min>0.000000</min><max>0.000000</max></latitude>");
45
46    atk_value_get_maximum_value(ATK_VALUE(obj), &value);
47    _printf("atk_value_get_maximum_value:\n%s\n", g_value_get_string(&value));
48
49    atk_value_get_minimum_value(ATK_VALUE(obj), &value);
50    _printf("atk_value_get_minimum_value:\n%s\n", g_value_get_string(&value));
51
52    atk_value_get_minimum_increment(ATK_VALUE(obj), &value);
53    _printf("atk_value_get_minimum_increment:\n%s\n", g_value_get_string(&value));
54
55    eailu_test_code_called = 1;
56 }
57
58 EAPI_MAIN int
59 elm_main(int argc, char **argv)
60 {
61    Evas_Object *win;
62
63    win = eailu_create_test_window_with_glib_init(_on_done, _on_focus_in);
64    g_assert(win);
65    _init_route(win);
66    evas_object_show(win);
67    elm_run();
68    elm_shutdown();
69
70    return 0;
71 }
72 ELM_MAIN()