summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorWonki Kim <wonki_.kim@samsung.com>2019-09-21 04:28:24 +0000
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-09-23 10:44:33 +0200
commitfe8715e9f6082da8c6b6e65b8c944b80730b8d4e (patch)
tree7558fd6200ecf4f705f4185c952da61ed2d5c2e3 /src/tests
parent654e783d28b1a13fd4cf08f5ef0d4a5b171d3a39 (diff)
test: Add a logic to check a size of Check
If I pack a check without any api calls into a box, then it doesn't have the hint_min size which is defined on check edc. I guess there are problems on sizing logic currently, so this patch helps people to test the problem. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D10038
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/elementary/elm_test_check.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/tests/elementary/elm_test_check.c b/src/tests/elementary/elm_test_check.c
index 74af40f235..4881aaa876 100644
--- a/src/tests/elementary/elm_test_check.c
+++ b/src/tests/elementary/elm_test_check.c
@@ -6,6 +6,32 @@
6#include <Elementary.h> 6#include <Elementary.h>
7#include "elm_suite.h" 7#include "elm_suite.h"
8 8
9EFL_START_TEST(elm_test_check_size)
10{
11 Evas_Object *win, *check, *box;
12 int width, height;
13
14 win = elm_win_util_standard_add("check", "Check");
15
16 box = elm_box_add(win);
17 evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
18 elm_win_resize_object_add(win, box);
19 evas_object_show(box);
20
21 check = elm_check_add(box);
22 elm_box_pack_end(box, check);
23 evas_object_show(check);
24
25 evas_object_show(win);
26
27 get_me_to_those_events(check);
28
29 evas_object_size_hint_min_get(check, &width, &height);
30 ck_assert_int_gt(width, 0);
31 ck_assert_int_gt(height, 0);
32}
33EFL_END_TEST
34
9EFL_START_TEST(elm_test_check_legacy_type_check) 35EFL_START_TEST(elm_test_check_legacy_type_check)
10{ 36{
11 Evas_Object *win, *check; 37 Evas_Object *win, *check;
@@ -122,6 +148,7 @@ EFL_END_TEST
122 148
123void elm_test_check(TCase *tc) 149void elm_test_check(TCase *tc)
124{ 150{
151 tcase_add_test(tc, elm_test_check_size);
125 tcase_add_test(tc, elm_test_check_legacy_type_check); 152 tcase_add_test(tc, elm_test_check_legacy_type_check);
126 tcase_add_test(tc, elm_test_check_onoff_text); 153 tcase_add_test(tc, elm_test_check_onoff_text);
127 tcase_add_test(tc, elm_test_check_state); 154 tcase_add_test(tc, elm_test_check_state);