zmike pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=2021c756ef27422e9ea979f8f52065e781c318cb
commit 2021c756ef27422e9ea979f8f52065e781c318cb Author: Mike Blumenkrantz <zm...@samsung.com> Date: Thu Oct 31 09:02:49 2019 -0400 tests/spec: store test class and reuse globally to avoid needing efl_isa Summary: Depends on D10569 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10570 --- src/tests/elementary/spec/efl_test_pack_linear.c | 2 +- src/tests/elementary/spec/efl_ui_spec_suite.c | 2 ++ src/tests/elementary/spec/efl_ui_spec_suite.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tests/elementary/spec/efl_test_pack_linear.c b/src/tests/elementary/spec/efl_test_pack_linear.c index 3886dfde9b..98ca1ef99f 100644 --- a/src/tests/elementary/spec/efl_test_pack_linear.c +++ b/src/tests/elementary/spec/efl_test_pack_linear.c @@ -471,7 +471,7 @@ EFL_END_TEST void object_setup(void) { - if (efl_isa(widget, EFL_UI_GROUP_ITEM_CLASS)) + if (widget_klass == EFL_UI_GROUP_ITEM_CLASS) { Efl_Ui_Collection *collection = efl_add(EFL_UI_GRID_CLASS, win); efl_content_set(win, collection); diff --git a/src/tests/elementary/spec/efl_ui_spec_suite.c b/src/tests/elementary/spec/efl_ui_spec_suite.c index 50b32c362e..36b51b58c3 100644 --- a/src/tests/elementary/spec/efl_ui_spec_suite.c +++ b/src/tests/elementary/spec/efl_ui_spec_suite.c @@ -11,6 +11,7 @@ Evas_Object *win = NULL; Evas_Object *widget = NULL; const Efl_Class *test_content_klass = NULL; +const Efl_Class *widget_klass = NULL; EFL_CLASS_SIMPLE_CLASS(efl_ui_widget, "efl_ui_widget", EFL_UI_WIDGET_CLASS); EFL_CLASS_SIMPLE_CLASS(efl_ui_item, "efl_ui_item", EFL_UI_ITEM_CLASS); #define EFL_UI_ITEM_REALIZED_CLASS efl_ui_item_realized_class_get() @@ -22,6 +23,7 @@ _setup_window_and_widget(const Efl_Class *klass, const Efl_Class *content_klass) ck_assert(!widget); test_content_klass = content_klass; + widget_klass = klass; win = win_add(); widget = efl_add(klass, win); efl_content_set(win, widget); diff --git a/src/tests/elementary/spec/efl_ui_spec_suite.h b/src/tests/elementary/spec/efl_ui_spec_suite.h index 63c8b2c125..9b785c5ce5 100644 --- a/src/tests/elementary/spec/efl_ui_spec_suite.h +++ b/src/tests/elementary/spec/efl_ui_spec_suite.h @@ -9,6 +9,7 @@ extern Eo *win; extern Eo *widget; +extern const Efl_Class *widget_klass; void efl_pack_behavior_test(TCase *tc); void efl_pack_linear_behavior_test(TCase *tc); --