From c7564bceea90c491c3af39b049841cdcc8ca5827 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Wed, 25 Sep 2019 21:46:54 +0200 Subject: [PATCH] Revert "elm: add basics test to create a destroy *every* widget with errors" This reverts commit 10cdb070180e0f1e62d5b8e5d5164a19fbc51548. this does not pass on ci ... o.O --- src/tests/elementary/elm_suite.c | 1 - src/tests/elementary/elm_suite.h | 1 - src/tests/elementary/elm_test_widget_basics.c | 137 -------------------------- src/tests/elementary/meson.build | 3 +- 4 files changed, 1 insertion(+), 141 deletions(-) delete mode 100644 src/tests/elementary/elm_test_widget_basics.c diff --git a/src/tests/elementary/elm_suite.c b/src/tests/elementary/elm_suite.c index d6aa463..87fac6e 100644 --- a/src/tests/elementary/elm_suite.c +++ b/src/tests/elementary/elm_suite.c @@ -86,7 +86,6 @@ static const Efl_Test_Case etc[] = { { "elm_code_widget_selection", elm_code_test_widget_selection }, { "elm_code_widget_undo", elm_code_test_widget_undo }, { "elm_widget_focus", elm_test_widget_focus}, - { "elm_widget_basics", elm_test_widget_basics}, { NULL, NULL } }; diff --git a/src/tests/elementary/elm_suite.h b/src/tests/elementary/elm_suite.h index 67f5d0d..ba76b29 100644 --- a/src/tests/elementary/elm_suite.h +++ b/src/tests/elementary/elm_suite.h @@ -84,7 +84,6 @@ void elm_test_slideshow(TCase *tc); void elm_test_spinner(TCase *tc); void elm_test_plug(TCase *tc); void elm_test_widget_focus(TCase *tc); -void elm_test_widget_basics(TCase *tc); void elm_code_file_test_load(TCase *tc); void elm_code_file_test_memory(TCase *tc); diff --git a/src/tests/elementary/elm_test_widget_basics.c b/src/tests/elementary/elm_test_widget_basics.c deleted file mode 100644 index e66a9ac..0000000 --- a/src/tests/elementary/elm_test_widget_basics.c +++ /dev/null @@ -1,137 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#endif - -#include -#include "elm_suite.h" - -typedef struct _Simple_Test_Widget -{ - Evas_Object* (*constructor)(Evas_Object *win); - const char *name; -} Simple_Test_Widget; - - -static const Simple_Test_Widget simple_widgets[] = { - {elm_flip_add, "flip"}, - {elm_frame_add, "frame"}, - {elm_player_add, "player"}, - {elm_video_add, "video"}, - {elm_ctxpopup_add, "ctxpopup"}, - {elm_fileselector_add, "fileselector"}, - {elm_hoversel_add, "hoversel"}, - {elm_multibuttonentry_add, "multibuttonentry"}, - {elm_naviframe_add, "naviframe"}, - {elm_popup_add, "popup"}, - {elm_actionslider_add, "actionslider"}, - {elm_bg_add, "bg"}, - {elm_box_add, "box"}, - {elm_bubble_add, "bubble"}, - {elm_calendar_add, "calendar"}, - {elm_button_add, "button"}, - {elm_check_add, "check"}, - {elm_clock_add, "clock"}, - {elm_colorselector_add, "colorselector"}, - {elm_conformant_add, "conformant"}, - {elm_dayselector_add, "dayselector"}, - {elm_entry_add, "entry"}, - {elm_flipselector_add, "flipselector"}, - {elm_gengrid_add, "gengrid"}, - {elm_genlist_add, "genlist"}, - {elm_glview_add, "glview"}, - {elm_grid_add, "grid"}, - {elm_hover_add, "hover"}, - {elm_icon_add, "icon"}, - {elm_image_add, "image"}, - {elm_index_add, "index"}, - {elm_label_add, "label"}, - {elm_layout_add, "layout"}, - {elm_list_add, "list"}, - {elm_map_add, "map"}, - {elm_mapbuf_add, "mapbuf"}, - {elm_menu_add, "menu"}, - {elm_notify_add, "notify"}, - {elm_panel_add, "panel"}, - {elm_panes_add, "panes"}, - {elm_photo_add, "photo"}, - {elm_photocam_add, "photocam"}, - {elm_plug_add, "plug"}, - {elm_prefs_add, "prefs"}, - {elm_progressbar_add, "progressbar"}, - {elm_radio_add, "radio"}, - {elm_route_add, "route"}, - {elm_separator_add, "seperator"}, - {elm_slider_add, "slider"}, - {elm_slideshow_add, "slideshow"}, - {elm_spinner_add, "spinner"}, - {elm_table_add, "table"}, - {elm_textpath_add, "textpath"}, - {elm_toolbar_add, "toolbar"}, - {elm_web_add, "web"}, - {elm_diskselector_add, "diskselector"}, - {elm_datetime_add, "datetime"}, - //{elm_combobox_add, "button"}, This is a beta widget which was never public and is written in a few ways that break basic assertions of widgets base class - //{elm_thumb_add, "button"}, This dies because of a ethumb bug, where the log domain is not correctly inited - //{elm_systray_add, "button"}, This is not a elm widget, but matches the API regax - //{elm_factory_add, "button"}, This is a beta widget which was never public but matches the API regax - {NULL, NULL}, -}; - -EFL_START_TEST(elm_test_widget_creation_easy) -{ - Evas_Object *win, *o; - win = win_add(); - - evas_object_resize(win, 200, 200); - evas_object_show(win); - for (int i = 0; simple_widgets[i].name; ++i) - { - o = simple_widgets[i].constructor(win); - ck_assert_ptr_nonnull(o); - evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_win_resize_object_add(win, o); - evas_object_show(o); - evas_object_del(o); - } -} -EFL_END_TEST - -EFL_START_TEST(elm_test_widget_creation_error_parent) -{ - Evas_Object *win, *o, *parent; - Evas *evas; - - win = win_add(); - evas = evas_object_evas_get(win); - evas_object_resize(win, 200, 200); - evas_object_show(win); - - parent = evas_object_rectangle_add(evas); - - for (int i = 0; simple_widgets[i].name; ++i) - { - if (eina_streq(simple_widgets[i].name, "gengrid") || - eina_streq(simple_widgets[i].name, "genlist")) - continue; - if (eina_streq(simple_widgets[i].name, "datetime")) //this crashes in textblock - continue; - - EXPECT_ERROR_START; - o = simple_widgets[i].constructor(parent); - EXPECT_ERROR_END; - ck_assert_ptr_nonnull(o); - evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_win_resize_object_add(win, o); - evas_object_show(o); - evas_object_del(o); - } -} -EFL_END_TEST - -void elm_test_widget_basics(TCase *tc) -{ - tcase_add_test(tc, elm_test_widget_creation_easy); - tcase_add_test(tc, elm_test_widget_creation_error_parent); -} diff --git a/src/tests/elementary/meson.build b/src/tests/elementary/meson.build index 5495315..f7d56d7 100644 --- a/src/tests/elementary/meson.build +++ b/src/tests/elementary/meson.build @@ -99,8 +99,7 @@ elementary_suite_src = [ 'elm_code_test_widget_text.c', 'elm_code_test_widget_selection.c', 'elm_code_test_widget_undo.c', - 'elm_test_widget_focus.c', - 'elm_test_widget_basics.c' + 'elm_test_widget_focus.c' ] elementary_suite = executable('elementary_suite', -- 2.7.4