diff options
author | Youngbok Shin <youngb.shin@samsung.com> | 2018-02-14 12:04:24 -0800 |
---|---|---|
committer | Cedric Bail <cedric@osg.samsung.com> | 2018-02-14 12:47:40 -0800 |
commit | 855c1886b68d898722e5aab5e27a10eba4294655 (patch) | |
tree | 2883d92bff48a6aee2e761f057175a8ae0d9214d | |
parent | 274730fc5f7e9e8995554ca02dfe8abd8b45211e (diff) | |
download | efl-855c1886b68d898722e5aab5e27a10eba4294655.tar.gz |
elementary: fix legacy widget type name for backward compat
Summary:
For example, the widget type of elm_button was "Elm_Button".
But, the object which is created by elm_button_add() will
return its widget type "Efl.Ui.Button_Legacy".
It is not legacy name. It should be fixed to return "Elm_Button".
I don't know when but eolian start to make class name with ".".
So, it should be converted to "_" for all widgets.
@fix
Test Plan:
All test cases are included in this patch.
Run "make check"
Reviewers: raster, cedric, jpeg, taxi2se
Reviewed By: cedric
Subscribers: taxi2se, woohyun
Differential Revision: https://phab.enlightenment.org/D5782
Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
63 files changed, 1544 insertions, 64 deletions
diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c index fbf5646665..93fc33345f 100644 --- a/src/lib/elementary/efl_ui_widget.c +++ b/src/lib/elementary/efl_ui_widget.c @@ -76,6 +76,77 @@ struct _Elm_Translate_String_Data Eina_Bool preset : 1; }; +/* For keeping backward compatibility (EFL 1.18 or older versions). + * Since EFL 1.19 which starts to use eolian_gen2, it does not convert + * "." to "_" among the class name. */ +static const char *legacy_type_table[][2] = +{ + { "Efl.Ui.Bg_Widget_Legacy", "Elm_Bg" }, + { "Efl.Ui.Button_Legacy", "Elm_Button" }, + { "Efl.Ui.Check_Legacy", "Elm_Check" }, + { "Efl.Ui.Clock_Legacy", "Elm_Datetime" }, + { "Efl.Ui.Flip_Legacy", "Elm_Flip" }, + { "Efl.Ui.Frame_Legacy", "Elm_Frame" }, + { "Efl.Ui.Image_Legacy", "Elm_Image" }, + { "Efl.Ui.Image_Zoomable_Legacy", "Elm_Photocam" }, + { "Efl.Ui.Layout_Legacy", "Elm_Layout" }, + { "Efl.Ui.Multibuttonentry_Legacy", "Elm_Multibuttonentry" }, + { "Efl.Ui.Panes_Legacy", "Elm_Panes" }, + { "Efl.Ui.Progressbar_Legacy", "Elm_Progressbar" }, + { "Efl.Ui.Radio_Legacy", "Elm_Radio" }, + { "Efl.Ui.Slider_Legacy", "Elm_Slider" }, + { "Efl.Ui.Video_Legacy", "Elm_Video" }, + { "Efl.Ui.Win_Legacy", "Elm_Win" }, + { "Elm.Code_Widget_Legacy", "Elm_Code_Widget" }, + { "Elm.Ctxpopup", "Elm_Ctxpopup" }, + { "Elm.Entry", "Elm_Entry" }, + { "Elm.Colorselector", "Elm_Colorselector" }, + { "Elm.List", "Elm_List" }, + { "Elm.Photo", "Elm_Photo" }, + { "Elm.Actionslider", "Elm_Actionslider" }, + { "Elm.Box", "Elm_Box" }, + { "Elm.Table", "Elm_Table" }, + { "Elm.Thumb", "Elm_Thumb" }, + { "Elm.Menu", "Elm_Menu" }, + { "Elm.Icon", "Elm_Icon" }, + { "Elm.Prefs", "Elm_Prefs" }, + { "Elm.Map", "Elm_Map" }, + { "Elm.Glview", "Elm_Glview" }, + { "Elm.Web", "Elm_Web" }, + { "Elm.Toolbar", "Elm_Toolbar" }, + { "Elm.Grid", "Elm_Grid" }, + { "Elm.Diskselector", "Elm_Diskselector" }, + { "Elm.Notify", "Elm_Notify" }, + { "Elm.Mapbuf", "Elm_Mapbuf" }, + { "Elm.Separator", "Elm_Separator" }, + { "Elm.Calendar", "Elm_Calendar" }, + { "Elm.Inwin", "Elm_Inwin" }, + { "Elm.Gengrid", "Elm_Gengrid" }, + { "Elm.Scroller", "Elm_Scroller" }, + { "Elm.Player", "Elm_Player" }, + { "Elm.Segment_Control", "Elm_Segment_Control" }, + { "Elm.Fileselector", "Elm_Fileselector" }, + { "Elm.Fileselector_Button", "Elm_Fileselector_Button" }, + { "Elm.Fileselector_Entry", "Elm_Fileselector_Entry" }, + { "Elm.Flipselector", "Elm_Flipselector" }, + { "Elm.Hoversel", "Elm_Hoversel" }, + { "Elm.Naviframe", "Elm_Naviframe" }, + { "Elm.Popup", "Elm_Popup" }, + { "Elm.Bubble", "Elm_Bubble" }, + { "Elm.Clock", "Elm_Clock" }, + { "Elm.Conformant", "Elm_Conformant" }, + { "Elm.Dayselector", "Elm_Dayselector" }, + { "Elm.Genlist", "Elm_Genlist" }, + { "Elm.Hover", "Elm_Hover" }, + { "Elm.Index", "Elm_Index" }, + { "Elm.Label", "Elm_Label" }, + { "Elm.Panel", "Elm_Panel" }, + { "Elm.Slideshow", "Elm_Slideshow" }, + { "Elm.Spinner", "Elm_Spinner" }, + { "Elm.Plug", "Elm_Plug" }, + { NULL, NULL } +}; + /* local subsystem globals */ static inline Eina_Bool _elm_widget_is(const Evas_Object *obj) @@ -3137,12 +3208,30 @@ elm_widget_is_check(const Evas_Object *obj) return EINA_FALSE; } +/* If you changed a legacy widget's class name, + * please update the "legacy_type_table". */ EAPI const char * elm_widget_type_get(const Evas_Object *obj) { + const char *ret; + int i; + API_ENTRY return NULL; - return efl_class_name_get(efl_class_get(obj)); + ret = efl_class_name_get(efl_class_get(obj)); + + /* If the given widget is created for legacy, + * convert type name to legacy. */ + if (elm_widget_is_legacy(obj)) + { + for (i = 0; legacy_type_table[i][0] ; i++) + { + if (eina_streq(ret, legacy_type_table[i][0])) + return legacy_type_table[i][1]; + } + } + + return ret; } EAPI Eina_Bool diff --git a/src/tests/elementary/elm_test_actionslider.c b/src/tests/elementary/elm_test_actionslider.c index c84bfbac4b..aaeeb135eb 100644 --- a/src/tests/elementary/elm_test_actionslider.c +++ b/src/tests/elementary/elm_test_actionslider.c @@ -6,6 +6,28 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_actionslider_legacy_type_check) +{ + Evas_Object *win, *actionslider; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "actionslider", ELM_WIN_BASIC); + + actionslider = elm_actionslider_add(win); + + type = elm_object_widget_type_get(actionslider); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Actionslider")); + + type = evas_object_type_get(actionslider); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_actionslider")); + + elm_shutdown(); +} +END_TEST + START_TEST (elm_atspi_role_get) { Evas_Object *win, *actionslider; @@ -25,5 +47,6 @@ END_TEST void elm_test_actionslider(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_actionslider_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_bg.c b/src/tests/elementary/elm_test_bg.c index 8c2047d7a2..6f570371c8 100644 --- a/src/tests/elementary/elm_test_bg.c +++ b/src/tests/elementary/elm_test_bg.c @@ -5,6 +5,29 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_bg_legacy_type_check) +{ + Evas_Object *win, *bg; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "bg", ELM_WIN_BASIC); + + bg = elm_bg_add(win); + + type = elm_object_widget_type_get(bg); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Bg")); + + type = evas_object_type_get(bg); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_bg")); + + elm_shutdown(); +} +END_TEST + void elm_test_bg(TCase *tc EINA_UNUSED) { + tcase_add_test(tc, elm_bg_legacy_type_check); } diff --git a/src/tests/elementary/elm_test_box.c b/src/tests/elementary/elm_test_box.c index 9e02995f90..02df2779fc 100644 --- a/src/tests/elementary/elm_test_box.c +++ b/src/tests/elementary/elm_test_box.c @@ -6,6 +6,28 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_box_legacy_type_check) +{ + Evas_Object *win, *box; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "box", ELM_WIN_BASIC); + + box = elm_box_add(win); + + type = elm_object_widget_type_get(box); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Box")); + + type = evas_object_type_get(box); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_box")); + + elm_shutdown(); +} +END_TEST + START_TEST (elm_atspi_role_get) { Evas_Object *win, *box; @@ -25,5 +47,6 @@ END_TEST void elm_test_box(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_box_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_bubble.c b/src/tests/elementary/elm_test_bubble.c index 490bef012a..fb92261224 100644 --- a/src/tests/elementary/elm_test_bubble.c +++ b/src/tests/elementary/elm_test_bubble.c @@ -6,6 +6,28 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_bubble_legacy_type_check) +{ + Evas_Object *win, *bubble; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "bubble", ELM_WIN_BASIC); + + bubble = elm_bubble_add(win); + + type = elm_object_widget_type_get(bubble); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Bubble")); + + type = evas_object_type_get(bubble); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_bubble")); + + elm_shutdown(); +} +END_TEST + START_TEST (elm_atspi_role_get) { Evas_Object *win, *bubble; @@ -25,6 +47,7 @@ END_TEST void elm_test_bubble(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_bubble_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_button.c b/src/tests/elementary/elm_test_button.c index 3a23fe8cad..b5937e1c01 100644 --- a/src/tests/elementary/elm_test_button.c +++ b/src/tests/elementary/elm_test_button.c @@ -8,6 +8,28 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_button_legacy_type_check) +{ + Evas_Object *win, *button; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "button", ELM_WIN_BASIC); + + button = elm_button_add(win); + + type = elm_object_widget_type_get(button); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Button")); + + type = evas_object_type_get(button); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_button")); + + elm_shutdown(); +} +END_TEST + START_TEST (elm_atspi_role_get) { Evas_Object *win, *button; @@ -44,6 +66,7 @@ END_TEST void elm_test_button(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); - tcase_add_test(tc, elm_atspi_interfaces_check); + tcase_add_test(tc, elm_button_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_atspi_interfaces_check); } diff --git a/src/tests/elementary/elm_test_calendar.c b/src/tests/elementary/elm_test_calendar.c index 6cc3b5be50..5b7f42847b 100644 --- a/src/tests/elementary/elm_test_calendar.c +++ b/src/tests/elementary/elm_test_calendar.c @@ -6,6 +6,28 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_calendar_legacy_type_check) +{ + Evas_Object *win, *calendar; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "calendar", ELM_WIN_BASIC); + + calendar = elm_calendar_add(win); + + type = elm_object_widget_type_get(calendar); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Calendar")); + + type = evas_object_type_get(calendar); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_calendar")); + + elm_shutdown(); +} +END_TEST + START_TEST (elm_atspi_role_get) { Evas_Object *win, *calendar; @@ -25,5 +47,6 @@ END_TEST void elm_test_calendar(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_calendar_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_check.c b/src/tests/elementary/elm_test_check.c index 2d1c06ec8f..25bd310f89 100644 --- a/src/tests/elementary/elm_test_check.c +++ b/src/tests/elementary/elm_test_check.c @@ -6,6 +6,28 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_check_legacy_type_check) +{ + Evas_Object *win, *check; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "check", ELM_WIN_BASIC); + + check = elm_check_add(win); + + type = elm_object_widget_type_get(check); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Check")); + + type = evas_object_type_get(check); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_check")); + + elm_shutdown(); +} +END_TEST + START_TEST (elm_check_onoff_text) { Evas_Object *win, *check; @@ -69,6 +91,7 @@ END_TEST void elm_test_check(TCase *tc) { + tcase_add_test(tc, elm_check_legacy_type_check); tcase_add_test(tc, elm_check_onoff_text); tcase_add_test(tc, elm_check_state); tcase_add_test(tc, elm_atspi_role_get); diff --git a/src/tests/elementary/elm_test_clock.c b/src/tests/elementary/elm_test_clock.c index f391e21b60..1467e6bc10 100644 --- a/src/tests/elementary/elm_test_clock.c +++ b/src/tests/elementary/elm_test_clock.c @@ -6,6 +6,28 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_clock_legacy_type_check) +{ + Evas_Object *win, *clock; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "clock", ELM_WIN_BASIC); + + clock = elm_clock_add(win); + + type = elm_object_widget_type_get(clock); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Clock")); + + type = evas_object_type_get(clock); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_clock")); + + elm_shutdown(); +} +END_TEST + START_TEST (elm_atspi_role_get) { Evas_Object *win, *clk; @@ -25,6 +47,7 @@ END_TEST void elm_test_clock(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_clock_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_colorselector.c b/src/tests/elementary/elm_test_colorselector.c index 0703583211..2cb85332b6 100644 --- a/src/tests/elementary/elm_test_colorselector.c +++ b/src/tests/elementary/elm_test_colorselector.c @@ -6,6 +6,28 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_colorselector_legacy_type_check) +{ + Evas_Object *win, *colorselector; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "colorselector", ELM_WIN_BASIC); + + colorselector = elm_colorselector_add(win); + + type = elm_object_widget_type_get(colorselector); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Colorselector")); + + type = evas_object_type_get(colorselector); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_colorselector")); + + elm_shutdown(); +} +END_TEST + START_TEST (elm_colorselector_palette) { Evas_Object *win, *c; @@ -52,6 +74,7 @@ END_TEST void elm_test_colorselector(TCase *tc) { + tcase_add_test(tc, elm_colorselector_legacy_type_check); tcase_add_test(tc, elm_colorselector_palette); tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_conformant.c b/src/tests/elementary/elm_test_conformant.c index fb8d5ce257..b13f08f6d7 100644 --- a/src/tests/elementary/elm_test_conformant.c +++ b/src/tests/elementary/elm_test_conformant.c @@ -6,6 +6,28 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_conformant_legacy_type_check) +{ + Evas_Object *win, *conformant; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "conformant", ELM_WIN_BASIC); + + conformant = elm_conformant_add(win); + + type = elm_object_widget_type_get(conformant); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Conformant")); + + type = evas_object_type_get(conformant); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_conformant")); + + elm_shutdown(); +} +END_TEST + START_TEST (elm_atspi_role_get) { Evas_Object *win, *conformant; @@ -25,5 +47,6 @@ END_TEST void elm_test_conformant(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_conformant_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_ctxpopup.c b/src/tests/elementary/elm_test_ctxpopup.c index 87dca0a4d2..7515ac0f74 100644 --- a/src/tests/elementary/elm_test_ctxpopup.c +++ b/src/tests/elementary/elm_test_ctxpopup.c @@ -6,6 +6,28 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_ctxpopup_legacy_type_check) +{ + Evas_Object *win, *ctxpopup; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "ctxpopup", ELM_WIN_BASIC); + + ctxpopup = elm_ctxpopup_add(win); + + type = elm_object_widget_type_get(ctxpopup); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Ctxpopup")); + + type = evas_object_type_get(ctxpopup); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_ctxpopup")); + + elm_shutdown(); +} +END_TEST + START_TEST (elm_atspi_role_get) { Evas_Object *win, *ctxpopup; @@ -25,5 +47,6 @@ END_TEST void elm_test_ctxpopup(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_ctxpopup_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_datetime.c b/src/tests/elementary/elm_test_datetime.c index 881841c587..5914efc746 100644 --- a/src/tests/elementary/elm_test_datetime.c +++ b/src/tests/elementary/elm_test_datetime.c @@ -6,6 +6,28 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_datetime_legacy_type_check) +{ + Evas_Object *win, *datetime; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "datetime", ELM_WIN_BASIC); + + datetime = elm_datetime_add(win); + + type = elm_object_widget_type_get(datetime); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Datetime")); + + type = evas_object_type_get(datetime); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_datetime")); + + elm_shutdown(); +} +END_TEST + START_TEST (elm_atspi_role_get) { Evas_Object *win, *datetime; @@ -25,5 +47,6 @@ END_TEST void elm_test_datetime(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_datetime_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_dayselector.c b/src/tests/elementary/elm_test_dayselector.c index ae75efc495..fc30ef186d 100644 --- a/src/tests/elementary/elm_test_dayselector.c +++ b/src/tests/elementary/elm_test_dayselector.c @@ -6,6 +6,28 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_dayselector_legacy_type_check) +{ + Evas_Object *win, *dayselector; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "dayselector", ELM_WIN_BASIC); + + dayselector = elm_dayselector_add(win); + + type = elm_object_widget_type_get(dayselector); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Dayselector")); + + type = evas_object_type_get(dayselector); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_dayselector")); + + elm_shutdown(); +} +END_TEST + START_TEST (elm_atspi_role_get) { Evas_Object *win, *dayselector; @@ -25,6 +47,7 @@ END_TEST void elm_test_dayselector(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_dayselector_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_diskselector.c b/src/tests/elementary/elm_test_diskselector.c index 15052bc2b6..0615e816e0 100644 --- a/src/tests/elementary/elm_test_diskselector.c +++ b/src/tests/elementary/elm_test_diskselector.c @@ -6,6 +6,28 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_diskselector_legacy_type_check) +{ + Evas_Object *win, *diskselector; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "diskselector", ELM_WIN_BASIC); + + diskselector = elm_diskselector_add(win); + + type = elm_object_widget_type_get(diskselector); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Diskselector")); + + type = evas_object_type_get(diskselector); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_diskselector")); + + elm_shutdown(); +} +END_TEST + START_TEST (elm_atspi_role_get) { Evas_Object *win, *diskselector; @@ -25,5 +47,6 @@ END_TEST void elm_test_diskselector(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_diskselector_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_entry.c b/src/tests/elementary/elm_test_entry.c index 07adf129fa..05aa0d3464 100644 --- a/src/tests/elementary/elm_test_entry.c +++ b/src/tests/elementary/elm_test_entry.c @@ -8,6 +8,28 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_entry_legacy_type_check) +{ + Evas_Object *win, *entry; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "entry", ELM_WIN_BASIC); + + entry = elm_entry_add(win); + + type = elm_object_widget_type_get(entry); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Entry")); + + type = evas_object_type_get(entry); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_entry")); + + elm_shutdown(); +} +END_TEST + START_TEST (elm_entry_del) { Evas_Object *win, *entry; @@ -397,6 +419,7 @@ END_TEST void elm_test_entry(TCase *tc) { + tcase_add_test(tc, elm_entry_legacy_type_check); tcase_add_test(tc, elm_entry_del); tcase_add_test(tc, elm_entry_signal_callback); tcase_add_test(tc, elm_entry_atspi_text_char_get); diff --git a/src/tests/elementary/elm_test_fileselector.c b/src/tests/elementary/elm_test_fileselector.c index da2738d0ad..c96e8b0120 100644 --- a/src/tests/elementary/elm_test_fileselector.c +++ b/src/tests/elementary/elm_test_fileselector.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_fileselector_legacy_type_check) +{ + Evas_Object *win, *fileselector; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "fileselector", ELM_WIN_BASIC); + + fileselector = elm_fileselector_add(win); + + type = elm_object_widget_type_get(fileselector); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Fileselector")); + + type = evas_object_type_get(fileselector); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_fileselector")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -87,6 +108,7 @@ END_TEST void elm_test_fileselector(TCase *tc) { + tcase_add_test(tc, elm_fileselector_legacy_type_check); tcase_add_test(tc, elm_atspi_role_get); tcase_add_test(tc, elm_fileselector_selected); } diff --git a/src/tests/elementary/elm_test_fileselector_button.c b/src/tests/elementary/elm_test_fileselector_button.c index aa6e12f37f..48473847ce 100644 --- a/src/tests/elementary/elm_test_fileselector_button.c +++ b/src/tests/elementary/elm_test_fileselector_button.c @@ -6,6 +6,28 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_fileselector_button_legacy_type_check) +{ + Evas_Object *win, *fs_button; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "fileselector_button", ELM_WIN_BASIC); + + fs_button = elm_fileselector_button_add(win); + + type = elm_object_widget_type_get(fs_button); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Fileselector_Button")); + + type = evas_object_type_get(fs_button); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_fileselector_button")); + + elm_shutdown(); +} +END_TEST + START_TEST (elm_atspi_role_get) { Evas_Object *win, *fs_button; @@ -25,5 +47,6 @@ END_TEST void elm_test_fileselector_button(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_fileselector_button_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_fileselector_entry.c b/src/tests/elementary/elm_test_fileselector_entry.c index fce9d3dc75..dd2400cf97 100644 --- a/src/tests/elementary/elm_test_fileselector_entry.c +++ b/src/tests/elementary/elm_test_fileselector_entry.c @@ -6,6 +6,28 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_fileselector_entry_legacy_type_check) +{ + Evas_Object *win, *fileselector_entry; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "fileselector_entry", ELM_WIN_BASIC); + + fileselector_entry = elm_fileselector_entry_add(win); + + type = elm_object_widget_type_get(fileselector_entry); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Fileselector_Entry")); + + type = evas_object_type_get(fileselector_entry); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_fileselector_entry")); + + elm_shutdown(); +} +END_TEST + START_TEST (elm_atspi_role_get) { Evas_Object *win, *fs_entry; @@ -25,5 +47,6 @@ END_TEST void elm_test_fileselector_entry(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_fileselector_entry_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_flip.c b/src/tests/elementary/elm_test_flip.c index e13bfde007..604b088977 100644 --- a/src/tests/elementary/elm_test_flip.c +++ b/src/tests/elementary/elm_test_flip.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_flip_legacy_type_check) +{ + Evas_Object *win, *flip; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "flip", ELM_WIN_BASIC); + + flip = elm_flip_add(win); + + type = elm_object_widget_type_get(flip); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Flip")); + + type = evas_object_type_get(flip); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_flip")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,5 +47,6 @@ END_TEST void elm_test_flip(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_flip_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_flipselector.c b/src/tests/elementary/elm_test_flipselector.c index 426892904c..53d514eff4 100644 --- a/src/tests/elementary/elm_test_flipselector.c +++ b/src/tests/elementary/elm_test_flipselector.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_flipselector_legacy_type_check) +{ + Evas_Object *win, *flipselector; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "flipselector", ELM_WIN_BASIC); + + flipselector = elm_flipselector_add(win); + + type = elm_object_widget_type_get(flipselector); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Flipselector")); + + type = evas_object_type_get(flipselector); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_flipselector")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,5 +47,6 @@ END_TEST void elm_test_flipselector(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_flipselector_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_frame.c b/src/tests/elementary/elm_test_frame.c index 4c90e9cd43..bf1efc7eaf 100644 --- a/src/tests/elementary/elm_test_frame.c +++ b/src/tests/elementary/elm_test_frame.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_frame_legacy_type_check) +{ + Evas_Object *win, *frame; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "frame", ELM_WIN_BASIC); + + frame = elm_frame_add(win); + + type = elm_object_widget_type_get(frame); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Frame")); + + type = evas_object_type_get(frame); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_frame")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,5 +47,6 @@ END_TEST void elm_test_frame(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_frame_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_gengrid.c b/src/tests/elementary/elm_test_gengrid.c index 76b199a52f..69d4b21837 100644 --- a/src/tests/elementary/elm_test_gengrid.c +++ b/src/tests/elementary/elm_test_gengrid.c @@ -7,6 +7,27 @@ #include "elm_suite.h" #include "elm_test_helper.h" +START_TEST (elm_gengrid_legacy_type_check) +{ + Evas_Object *win, *gengrid; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "gengrid", ELM_WIN_BASIC); + + gengrid = elm_gengrid_add(win); + + type = elm_object_widget_type_get(gengrid); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Gengrid")); + + type = evas_object_type_get(gengrid); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_gengrid")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -33,7 +54,7 @@ static Evas_Object *content; static Evas_Object * gl_content_get(void *data EINA_UNUSED, Evas_Object *obj, const char *part EINA_UNUSED) { - content = elm_button_add(obj); + content = elm_gengrid_add(obj); evas_object_show(content); return content; } @@ -76,6 +97,7 @@ END_TEST void elm_test_gengrid(TCase *tc) { + tcase_add_test(tc, elm_gengrid_legacy_type_check); tcase_add_test(tc, elm_atspi_role_get); #if 0 tcase_add_test(tc, elm_atspi_children_parent); diff --git a/src/tests/elementary/elm_test_genlist.c b/src/tests/elementary/elm_test_genlist.c index 4f53014e48..d7fd2f1c7f 100644 --- a/src/tests/elementary/elm_test_genlist.c +++ b/src/tests/elementary/elm_test_genlist.c @@ -14,6 +14,27 @@ static int counter; static Efl_Access_Event_Children_Changed_Data ev_data; Evas_Object *content; +START_TEST (elm_genlist_legacy_type_check) +{ + Evas_Object *win, *genlist; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "genlist", ELM_WIN_BASIC); + + genlist = elm_genlist_add(win); + + type = elm_object_widget_type_get(genlist); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Genlist")); + + type = evas_object_type_get(genlist); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_genlist")); + + elm_shutdown(); +} +END_TEST void test_init(void) { @@ -180,6 +201,7 @@ END_TEST void elm_test_genlist(TCase *tc) { + tcase_add_test(tc, elm_genlist_legacy_type_check); tcase_add_test(tc, elm_atspi_role_get); tcase_add_test(tc, elm_atspi_children_get1); tcase_add_test(tc, elm_atspi_children_get2); diff --git a/src/tests/elementary/elm_test_glview.c b/src/tests/elementary/elm_test_glview.c index 79849d87b9..d996f1ce93 100644 --- a/src/tests/elementary/elm_test_glview.c +++ b/src/tests/elementary/elm_test_glview.c @@ -6,6 +6,30 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_glview_legacy_type_check) +{ + Evas_Object *win, *glview; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "glview", ELM_WIN_BASIC); + + glview = elm_glview_add(win); + + if (glview) + { + type = elm_object_widget_type_get(glview); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Glview")); + + type = evas_object_type_get(glview); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_glview")); + } + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -30,5 +54,6 @@ END_TEST void elm_test_glview(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_glview_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_grid.c b/src/tests/elementary/elm_test_grid.c index e41f8b1219..3e95fcaad4 100644 --- a/src/tests/elementary/elm_test_grid.c +++ b/src/tests/elementary/elm_test_grid.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_grid_legacy_type_check) +{ + Evas_Object *win, *grid; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "grid", ELM_WIN_BASIC); + + grid = elm_grid_add(win); + + type = elm_object_widget_type_get(grid); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Grid")); + + type = evas_object_type_get(grid); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_grid")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,5 +47,6 @@ END_TEST void elm_test_grid(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_grid_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_hover.c b/src/tests/elementary/elm_test_hover.c index 5b048ed26c..d6ce4a4e9b 100644 --- a/src/tests/elementary/elm_test_hover.c +++ b/src/tests/elementary/elm_test_hover.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_hover_legacy_type_check) +{ + Evas_Object *win, *hover; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "hover", ELM_WIN_BASIC); + + hover = elm_hover_add(win); + + type = elm_object_widget_type_get(hover); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Hover")); + + type = evas_object_type_get(hover); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_hover")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,5 +47,6 @@ END_TEST void elm_test_hover(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_hover_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_hoversel.c b/src/tests/elementary/elm_test_hoversel.c index 8c2ecc71f6..0514811114 100644 --- a/src/tests/elementary/elm_test_hoversel.c +++ b/src/tests/elementary/elm_test_hoversel.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_hoversel_legacy_type_check) +{ + Evas_Object *win, *hoversel; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "hoversel", ELM_WIN_BASIC); + + hoversel = elm_hoversel_add(win); + + type = elm_object_widget_type_get(hoversel); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Hoversel")); + + type = evas_object_type_get(hoversel); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_hoversel")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,5 +47,6 @@ END_TEST void elm_test_hoversel(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_hoversel_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_icon.c b/src/tests/elementary/elm_test_icon.c index 2b2150665d..ca53a4727d 100644 --- a/src/tests/elementary/elm_test_icon.c +++ b/src/tests/elementary/elm_test_icon.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_icon_legacy_type_check) +{ + Evas_Object *win, *icon; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "icon", ELM_WIN_BASIC); + + icon = elm_icon_add(win); + + type = elm_object_widget_type_get(icon); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Icon")); + + type = evas_object_type_get(icon); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_icon")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,5 +47,6 @@ END_TEST void elm_test_icon(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_icon_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_image.c b/src/tests/elementary/elm_test_image.c index 39f5107e90..25cfccfaa1 100644 --- a/src/tests/elementary/elm_test_image.c +++ b/src/tests/elementary/elm_test_image.c @@ -17,6 +17,28 @@ struct _Test_Data int success; }; +START_TEST (elm_image_legacy_type_check) +{ + Evas_Object *win, *image; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "image", ELM_WIN_BASIC); + + image = elm_image_add(win); + + type = elm_object_widget_type_get(image); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Image")); + + type = evas_object_type_get(image); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_image")); + + elm_shutdown(); +} +END_TEST + START_TEST (elm_atspi_role_get) { Evas_Object *win, *image; @@ -205,8 +227,9 @@ END_TEST void elm_test_image(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); - tcase_add_test(tc, elm_image_async_path); - tcase_add_test(tc, elm_image_async_mmap); - tcase_add_test(tc, efl_ui_image_icon); + tcase_add_test(tc, elm_image_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_image_async_path); + tcase_add_test(tc, elm_image_async_mmap); + tcase_add_test(tc, efl_ui_image_icon); } diff --git a/src/tests/elementary/elm_test_index.c b/src/tests/elementary/elm_test_index.c index 1de056b86d..0272412734 100644 --- a/src/tests/elementary/elm_test_index.c +++ b/src/tests/elementary/elm_test_index.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_index_legacy_type_check) +{ + Evas_Object *win, *index; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "index", ELM_WIN_BASIC); + + index = elm_index_add(win); + + type = elm_object_widget_type_get(index); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Index")); + + type = evas_object_type_get(index); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_index")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,5 +47,6 @@ END_TEST void elm_test_index(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_index_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_inwin.c b/src/tests/elementary/elm_test_inwin.c index e0494844cb..d62e7c228d 100644 --- a/src/tests/elementary/elm_test_inwin.c +++ b/src/tests/elementary/elm_test_inwin.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_inwin_legacy_type_check) +{ + Evas_Object *win, *inwin; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "inwin", ELM_WIN_BASIC); + + inwin = elm_win_inwin_add(win); + + type = elm_object_widget_type_get(inwin); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Inwin")); + + type = evas_object_type_get(inwin); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_inwin")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,5 +47,6 @@ END_TEST void elm_test_inwin(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_inwin_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_label.c b/src/tests/elementary/elm_test_label.c index 75b27ea959..10b5c7d1bd 100644 --- a/src/tests/elementary/elm_test_label.c +++ b/src/tests/elementary/elm_test_label.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_label_legacy_type_check) +{ + Evas_Object *win, *label; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "label", ELM_WIN_BASIC); + + label = elm_label_add(win); + + type = elm_object_widget_type_get(label); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Label")); + + type = evas_object_type_get(label); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_label")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,5 +47,6 @@ END_TEST void elm_test_label(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_label_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_layout.c b/src/tests/elementary/elm_test_layout.c index dc506e4f8a..dc6ec03a36 100644 --- a/src/tests/elementary/elm_test_layout.c +++ b/src/tests/elementary/elm_test_layout.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_layout_legacy_type_check) +{ + Evas_Object *win, *layout; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "layout", ELM_WIN_BASIC); + + layout = elm_layout_add(win); + + type = elm_object_widget_type_get(layout); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Layout")); + + type = evas_object_type_get(layout); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_layout")); + + elm_shutdown(); +} +END_TEST START_TEST(elm_atspi_role_get) { @@ -94,6 +115,7 @@ END_TEST void elm_test_layout(TCase *tc) { + tcase_add_test(tc, elm_layout_legacy_type_check); tcase_add_test(tc, elm_atspi_role_get); tcase_add_test(tc, elm_layout_swallows); tcase_add_test(tc, elm_layout_model_connect); diff --git a/src/tests/elementary/elm_test_list.c b/src/tests/elementary/elm_test_list.c index 24ffcdc84c..0c5f5c46a9 100644 --- a/src/tests/elementary/elm_test_list.c +++ b/src/tests/elementary/elm_test_list.c @@ -8,6 +8,28 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_list_legacy_type_check) +{ + Evas_Object *win, *list; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "list", ELM_WIN_BASIC); + + list = elm_list_add(win); + + type = elm_object_widget_type_get(list); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_List")); + + type = evas_object_type_get(list); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_list")); + + elm_shutdown(); +} +END_TEST + #if 0 // Skip following tests until Elm_Widget_Item will migrate to Eo infrastructure // and following features can be implemented @@ -233,15 +255,16 @@ END_TEST void elm_test_list(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_list_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); #if 0 - tcase_add_test(tc, elm_list_atspi_selection_selected_children_count_get); - tcase_add_test(tc, elm_list_atspi_selection_child_select); - tcase_add_test(tc, elm_list_atspi_selection_selected_child_deselect); - tcase_add_test(tc, elm_list_atspi_selection_is_child_selected); - tcase_add_test(tc, elm_list_atspi_selection_all_children_select); - tcase_add_test(tc, elm_list_atspi_selection_clear); - tcase_add_test(tc, elm_list_atspi_selection_child_deselect); + tcase_add_test(tc, elm_list_atspi_selection_selected_children_count_get); + tcase_add_test(tc, elm_list_atspi_selection_child_select); + tcase_add_test(tc, elm_list_atspi_selection_selected_child_deselect); + tcase_add_test(tc, elm_list_atspi_selection_is_child_selected); + tcase_add_test(tc, elm_list_atspi_selection_all_children_select); + tcase_add_test(tc, elm_list_atspi_selection_clear); + tcase_add_test(tc, elm_list_atspi_selection_child_deselect); #endif - tcase_add_test(tc, elm_atspi_children_parent); + tcase_add_test(tc, elm_atspi_children_parent); } diff --git a/src/tests/elementary/elm_test_map.c b/src/tests/elementary/elm_test_map.c index 954892c20c..8a8c82acd0 100644 --- a/src/tests/elementary/elm_test_map.c +++ b/src/tests/elementary/elm_test_map.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_map_legacy_type_check) +{ + Evas_Object *win, *map; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "map", ELM_WIN_BASIC); + + map = elm_map_add(win); + + type = elm_object_widget_type_get(map); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Map")); + + type = evas_object_type_get(map); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_map")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,5 +47,6 @@ END_TEST void elm_test_map(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_map_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_mapbuf.c b/src/tests/elementary/elm_test_mapbuf.c index 6b9507e1f1..b0f42c0f9c 100644 --- a/src/tests/elementary/elm_test_mapbuf.c +++ b/src/tests/elementary/elm_test_mapbuf.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_mapbuf_legacy_type_check) +{ + Evas_Object *win, *mapbuf; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "mapbuf", ELM_WIN_BASIC); + + mapbuf = elm_mapbuf_add(win); + + type = elm_object_widget_type_get(mapbuf); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Mapbuf")); + + type = evas_object_type_get(mapbuf); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_mapbuf")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,5 +47,6 @@ END_TEST void elm_test_mapbuf(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_mapbuf_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_menu.c b/src/tests/elementary/elm_test_menu.c index 69f2512ed7..d1e7c24419 100644 --- a/src/tests/elementary/elm_test_menu.c +++ b/src/tests/elementary/elm_test_menu.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_menu_legacy_type_check) +{ + Evas_Object *win, *menu; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "menu", ELM_WIN_BASIC); + + menu = elm_menu_add(win); + + type = elm_object_widget_type_get(menu); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Menu")); + + type = evas_object_type_get(menu); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_menu")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,5 +47,6 @@ END_TEST void elm_test_menu(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_menu_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_multibuttonentry.c b/src/tests/elementary/elm_test_multibuttonentry.c index 971d5c8647..0495974854 100644 --- a/src/tests/elementary/elm_test_multibuttonentry.c +++ b/src/tests/elementary/elm_test_multibuttonentry.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_multibuttonentry_legacy_type_check) +{ + Evas_Object *win, *multibuttonentry; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "multibuttonentry", ELM_WIN_BASIC); + + multibuttonentry = elm_multibuttonentry_add(win); + + type = elm_object_widget_type_get(multibuttonentry); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Multibuttonentry")); + + type = evas_object_type_get(multibuttonentry); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_multibuttonentry")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,5 +47,6 @@ END_TEST void elm_test_multibuttonentry(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_multibuttonentry_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_naviframe.c b/src/tests/elementary/elm_test_naviframe.c index 55fa2e227f..4729f6569b 100644 --- a/src/tests/elementary/elm_test_naviframe.c +++ b/src/tests/elementary/elm_test_naviframe.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_naviframe_legacy_type_check) +{ + Evas_Object *win, *naviframe; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "naviframe", ELM_WIN_BASIC); + + naviframe = elm_naviframe_add(win); + + type = elm_object_widget_type_get(naviframe); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Naviframe")); + + type = evas_object_type_get(naviframe); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_naviframe")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,5 +47,6 @@ END_TEST void elm_test_naviframe(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_naviframe_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_notify.c b/src/tests/elementary/elm_test_notify.c index 6ef03d7aa3..a018dbc3a9 100644 --- a/src/tests/elementary/elm_test_notify.c +++ b/src/tests/elementary/elm_test_notify.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_notify_legacy_type_check) +{ + Evas_Object *win, *notify; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "notify", ELM_WIN_BASIC); + + notify = elm_notify_add(win); + + type = elm_object_widget_type_get(notify); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Notify")); + + type = evas_object_type_get(notify); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_notify")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,5 +47,6 @@ END_TEST void elm_test_notify(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_notify_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_panel.c b/src/tests/elementary/elm_test_panel.c index 312098d554..b710192ba1 100644 --- a/src/tests/elementary/elm_test_panel.c +++ b/src/tests/elementary/elm_test_panel.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_panel_legacy_type_check) +{ + Evas_Object *win, *panel; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "panel", ELM_WIN_BASIC); + + panel = elm_panel_add(win); + + type = elm_object_widget_type_get(panel); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Panel")); + + type = evas_object_type_get(panel); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_panel")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,6 +47,7 @@ END_TEST void elm_test_panel(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_panel_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_panes.c b/src/tests/elementary/elm_test_panes.c index 08d6992dc8..864ef611f0 100644 --- a/src/tests/elementary/elm_test_panes.c +++ b/src/tests/elementary/elm_test_panes.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_panes_legacy_type_check) +{ + Evas_Object *win, *panes; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "panes", ELM_WIN_BASIC); + + panes = elm_panes_add(win); + + type = elm_object_widget_type_get(panes); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Panes")); + + type = evas_object_type_get(panes); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_panes")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,5 +47,6 @@ END_TEST void elm_test_panes(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_panes_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_photo.c b/src/tests/elementary/elm_test_photo.c index cae85702b1..3a680b977c 100644 --- a/src/tests/elementary/elm_test_photo.c +++ b/src/tests/elementary/elm_test_photo.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_photo_legacy_type_check) +{ + Evas_Object *win, *photo; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "photo", ELM_WIN_BASIC); + + photo = elm_photo_add(win); + + type = elm_object_widget_type_get(photo); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Photo")); + + type = evas_object_type_get(photo); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_photo")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,5 +47,6 @@ END_TEST void elm_test_photo(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_photo_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_photocam.c b/src/tests/elementary/elm_test_photocam.c index 33aa91b731..dedf6ab4a8 100644 --- a/src/tests/elementary/elm_test_photocam.c +++ b/src/tests/elementary/elm_test_photocam.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_photocam_legacy_type_check) +{ + Evas_Object *win, *photocam; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "photocam", ELM_WIN_BASIC); + + photocam = elm_photocam_add(win); + + type = elm_object_widget_type_get(photocam); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Photocam")); + + type = evas_object_type_get(photocam); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_photocam")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -52,6 +73,7 @@ END_TEST void elm_test_photocam(TCase *tc) { + tcase_add_test(tc, elm_photocam_legacy_type_check); tcase_add_test(tc, elm_atspi_role_get); tcase_add_test(tc, efl_ui_image_zoomable_icon); } diff --git a/src/tests/elementary/elm_test_player.c b/src/tests/elementary/elm_test_player.c index de46096bb0..bd65c540f8 100644 --- a/src/tests/elementary/elm_test_player.c +++ b/src/tests/elementary/elm_test_player.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_player_legacy_type_check) +{ + Evas_Object *win, *player; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "player", ELM_WIN_BASIC); + + player = elm_player_add(win); + + type = elm_object_widget_type_get(player); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Player")); + + type = evas_object_type_get(player); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_player")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,5 +47,6 @@ END_TEST void elm_test_player(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_player_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_plug.c b/src/tests/elementary/elm_test_plug.c index e2ddcb4daf..17888acf11 100644 --- a/src/tests/elementary/elm_test_plug.c +++ b/src/tests/elementary/elm_test_plug.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_plug_legacy_type_check) +{ + Evas_Object *win, *plug; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "plug", ELM_WIN_BASIC); + + plug = elm_plug_add(win); + + type = elm_object_widget_type_get(plug); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Plug")); + + type = evas_object_type_get(plug); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_plug")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,5 +47,6 @@ END_TEST void elm_test_plug(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_plug_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_popup.c b/src/tests/elementary/elm_test_popup.c index 17b8433b1d..13649c1381 100644 --- a/src/tests/elementary/elm_test_popup.c +++ b/src/tests/elementary/elm_test_popup.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_popup_legacy_type_check) +{ + Evas_Object *win, *popup; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "popup", ELM_WIN_BASIC); + + popup = elm_popup_add(win); + + type = elm_object_widget_type_get(popup); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Popup")); + + type = evas_object_type_get(popup); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_popup")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,5 +47,6 @@ END_TEST void elm_test_popup(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_popup_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_prefs.c b/src/tests/elementary/elm_test_prefs.c index 298cb59753..3c42c65aa1 100644 --- a/src/tests/elementary/elm_test_prefs.c +++ b/src/tests/elementary/elm_test_prefs.c @@ -6,6 +6,30 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_prefs_legacy_type_check) +{ + Evas_Object *win, *prefs; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "prefs", ELM_WIN_BASIC); + + prefs = elm_prefs_add(win); + + if (prefs) + { + type = elm_object_widget_type_get(prefs); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Prefs")); + + type = evas_object_type_get(prefs); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_prefs")); + } + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -28,5 +52,6 @@ END_TEST void elm_test_prefs(TCase *tc) { + tcase_add_test(tc, elm_prefs_legacy_type_check); tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_progressbar.c b/src/tests/elementary/elm_test_progressbar.c index c953ed8347..09bc9f413a 100644 --- a/src/tests/elementary/elm_test_progressbar.c +++ b/src/tests/elementary/elm_test_progressbar.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_progressbar_legacy_type_check) +{ + Evas_Object *win, *progressbar; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "progressbar", ELM_WIN_BASIC); + + progressbar = elm_progressbar_add(win); + + type = elm_object_widget_type_get(progressbar); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Progressbar")); + + type = evas_object_type_get(progressbar); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_progressbar")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,5 +47,6 @@ END_TEST void elm_test_progressbar(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_progressbar_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_radio.c b/src/tests/elementary/elm_test_radio.c index ee71b7be24..9fa05f268f 100644 --- a/src/tests/elementary/elm_test_radio.c +++ b/src/tests/elementary/elm_test_radio.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_radio_legacy_type_check) +{ + Evas_Object *win, *radio; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "radio", ELM_WIN_BASIC); + + radio = elm_radio_add(win); + + type = elm_object_widget_type_get(radio); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Radio")); + + type = evas_object_type_get(radio); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_radio")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,5 +47,6 @@ END_TEST void elm_test_radio(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_radio_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_scroller.c b/src/tests/elementary/elm_test_scroller.c index baae424ed1..455bff9d74 100644 --- a/src/tests/elementary/elm_test_scroller.c +++ b/src/tests/elementary/elm_test_scroller.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_scroller_legacy_type_check) +{ + Evas_Object *win, *scroller; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "scroller", ELM_WIN_BASIC); + + scroller = elm_scroller_add(win); + + type = elm_object_widget_type_get(scroller); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Scroller")); + + type = evas_object_type_get(scroller); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_scroller")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,5 +47,6 @@ END_TEST void elm_test_scroller(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_scroller_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_segmentcontrol.c b/src/tests/elementary/elm_test_segmentcontrol.c index dafce0ef68..778a2ae809 100644 --- a/src/tests/elementary/elm_test_segmentcontrol.c +++ b/src/tests/elementary/elm_test_segmentcontrol.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_segment_control_legacy_type_check) +{ + Evas_Object *win, *segment_control; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "segment_control", ELM_WIN_BASIC); + + segment_control = elm_segment_control_add(win); + + type = elm_object_widget_type_get(segment_control); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Segment_Control")); + + type = evas_object_type_get(segment_control); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_segment_control")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,5 +47,6 @@ END_TEST void elm_test_segmentcontrol(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_segment_control_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_separator.c b/src/tests/elementary/elm_test_separator.c index f6e5ecae61..fc3f3f59fa 100644 --- a/src/tests/elementary/elm_test_separator.c +++ b/src/tests/elementary/elm_test_separator.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_separator_legacy_type_check) +{ + Evas_Object *win, *separator; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "separator", ELM_WIN_BASIC); + + separator = elm_separator_add(win); + + type = elm_object_widget_type_get(separator); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Separator")); + + type = evas_object_type_get(separator); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_separator")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,5 +47,6 @@ END_TEST void elm_test_separator(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_separator_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_slider.c b/src/tests/elementary/elm_test_slider.c index 0f08f4b117..174bbd1f49 100644 --- a/src/tests/elementary/elm_test_slider.c +++ b/src/tests/elementary/elm_test_slider.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_slider_legacy_type_check) +{ + Evas_Object *win, *slider; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "slider", ELM_WIN_BASIC); + + slider = elm_slider_add(win); + + type = elm_object_widget_type_get(slider); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Slider")); + + type = evas_object_type_get(slider); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_slider")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,5 +47,6 @@ END_TEST void elm_test_slider(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_slider_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_slideshow.c b/src/tests/elementary/elm_test_slideshow.c index c3b95d2bc5..1bd13f83c5 100644 --- a/src/tests/elementary/elm_test_slideshow.c +++ b/src/tests/elementary/elm_test_slideshow.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_slideshow_legacy_type_check) +{ + Evas_Object *win, *slideshow; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "slideshow", ELM_WIN_BASIC); + + slideshow = elm_slideshow_add(win); + + type = elm_object_widget_type_get(slideshow); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Slideshow")); + + type = evas_object_type_get(slideshow); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_slideshow")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,5 +47,6 @@ END_TEST void elm_test_slideshow(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_slideshow_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_spinner.c b/src/tests/elementary/elm_test_spinner.c index 75d97b8d72..f86d5a9af9 100644 --- a/src/tests/elementary/elm_test_spinner.c +++ b/src/tests/elementary/elm_test_spinner.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_spinner_legacy_type_check) +{ + Evas_Object *win, *spinner; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "spinner", ELM_WIN_BASIC); + + spinner = elm_spinner_add(win); + + type = elm_object_widget_type_get(spinner); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Spinner")); + + type = evas_object_type_get(spinner); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_spinner")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,6 +47,7 @@ END_TEST void elm_test_spinner(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_spinner_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_table.c b/src/tests/elementary/elm_test_table.c index 3cec20b2ad..ef75fe4bc8 100644 --- a/src/tests/elementary/elm_test_table.c +++ b/src/tests/elementary/elm_test_table.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_table_legacy_type_check) +{ + Evas_Object *win, *table; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "table", ELM_WIN_BASIC); + + table = elm_table_add(win); + + type = elm_object_widget_type_get(table); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Table")); + + type = evas_object_type_get(table); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_table")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,5 +47,6 @@ END_TEST void elm_test_table(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_table_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_thumb.c b/src/tests/elementary/elm_test_thumb.c index a319caf5dd..5568dedf2b 100644 --- a/src/tests/elementary/elm_test_thumb.c +++ b/src/tests/elementary/elm_test_thumb.c @@ -6,6 +6,28 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_thumb_legacy_type_check) +{ + Evas_Object *win, *thumb; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "thumb", ELM_WIN_BASIC); + + thumb = elm_thumb_add(win); + + type = elm_object_widget_type_get(thumb); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Thumb")); + + /* It had abnormal object type... */ + type = evas_object_type_get(thumb); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Thumb")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,5 +48,6 @@ END_TEST void elm_test_thumb(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_thumb_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_toolbar.c b/src/tests/elementary/elm_test_toolbar.c index eec3233a97..59d114ae12 100644 --- a/src/tests/elementary/elm_test_toolbar.c +++ b/src/tests/elementary/elm_test_toolbar.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_toolbar_legacy_type_check) +{ + Evas_Object *win, *toolbar; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "toolbar", ELM_WIN_BASIC); + + toolbar = elm_toolbar_add(win); + + type = elm_object_widget_type_get(toolbar); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Toolbar")); + + type = evas_object_type_get(toolbar); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_toolbar")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,5 +47,6 @@ END_TEST void elm_test_toolbar(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_toolbar_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_video.c b/src/tests/elementary/elm_test_video.c index f5213734f3..d5d1d97b3e 100644 --- a/src/tests/elementary/elm_test_video.c +++ b/src/tests/elementary/elm_test_video.c @@ -6,6 +6,27 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_video_legacy_type_check) +{ + Evas_Object *win, *video; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "video", ELM_WIN_BASIC); + + video = elm_video_add(win); + + type = elm_object_widget_type_get(video); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Video")); + + type = evas_object_type_get(video); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_video")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -26,5 +47,6 @@ END_TEST void elm_test_video(TCase *tc) { - tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_video_legacy_type_check); + tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_web.c b/src/tests/elementary/elm_test_web.c index 610d9fef05..afb28e9fc6 100644 --- a/src/tests/elementary/elm_test_web.c +++ b/src/tests/elementary/elm_test_web.c @@ -6,6 +6,30 @@ #include <Elementary.h> #include "elm_suite.h" +START_TEST (elm_web_legacy_type_check) +{ + Evas_Object *win, *web; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "web", ELM_WIN_BASIC); + + web = elm_web_add(win); + + if (web) + { + type = elm_object_widget_type_get(web); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Web")); + + type = evas_object_type_get(web); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_web")); + } + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -28,5 +52,6 @@ END_TEST void elm_test_web(TCase *tc) { + tcase_add_test(tc, elm_web_legacy_type_check); tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_win.c b/src/tests/elementary/elm_test_win.c index 807a823baa..22b894afd4 100644 --- a/src/tests/elementary/elm_test_win.c +++ b/src/tests/elementary/elm_test_win.c @@ -63,6 +63,25 @@ _timer_fail_flag_cb(void *data) return ECORE_CALLBACK_PASS_ON; } +START_TEST (elm_win_legacy_type_check) +{ + Evas_Object *win; + const char *type; + + elm_init(1, NULL); + win = elm_win_add(NULL, "win", ELM_WIN_BASIC); + + type = elm_object_widget_type_get(win); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "Elm_Win")); + + type = evas_object_type_get(win); + ck_assert(type != NULL); + ck_assert(!strcmp(type, "elm_win")); + + elm_shutdown(); +} +END_TEST START_TEST (elm_atspi_role_get) { @@ -398,6 +417,7 @@ END_TEST void elm_test_win(TCase *tc) { + tcase_add_test(tc, elm_win_legacy_type_check); tcase_add_test(tc, elm_atspi_role_get); tcase_add_test(tc, elm_atspi_component_position); tcase_add_test(tc, elm_atspi_component_size); |