summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-08-21 17:39:43 +0900
committerHermet Park <hermetpark@gmail.com>2019-08-21 17:40:15 +0900
commit8900cf0715e97640eb6226023a6005b4c6021e42 (patch)
treeb3ae6943645bdc291dddc32a4e76a7bd0c08b8df /src/tests
parent5f4c9a4458a744443837ca8b85139eac279b42f0 (diff)
efl_ui_animation_view: introduce a new widget for controlling vector animation.
Summary: This is a new convenient ui control that designed to load vector resources -svg, json-, and control animations if it supports. Please turn on evas-loaders-json in meson options, if you'd like to use Lottie Animation. Co-authored-by: JunsuChoi <jsuya.choi@samsung.com> @feature Reviewers: #committers, jsuya, zmike, bu5hm4n Reviewed By: #committers, bu5hm4n Subscribers: zmike, bu5hm4n, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9451
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/elementary/spec/efl_test_gfx_view.c39
-rw-r--r--src/tests/elementary/spec/efl_ui_spec_suite.h1
-rw-r--r--src/tests/elementary/spec/meson.build1
3 files changed, 41 insertions, 0 deletions
diff --git a/src/tests/elementary/spec/efl_test_gfx_view.c b/src/tests/elementary/spec/efl_test_gfx_view.c
new file mode 100644
index 0000000000..fc411138b6
--- /dev/null
+++ b/src/tests/elementary/spec/efl_test_gfx_view.c
@@ -0,0 +1,39 @@
1#ifdef HAVE_CONFIG_H
2# include "elementary_config.h"
3#endif
4
5#include <Efl_Ui.h>
6#include "efl_ui_spec_suite.h"
7#include "suite_helpers.h"
8
9/* spec-meta-start
10 {"test-interface":"Efl.Gfx.View",
11 "test-widgets": ["Efl.Ui.Animation_View"]}
12 spec-meta-end */
13
14EFL_START_TEST(view_size)
15{
16#define TUPLE_CHECK(W, H) \
17 do { \
18 Eina_Size2D sz; \
19 efl_gfx_view_size_set(widget, EINA_SIZE2D(W, H)); \
20 sz = efl_gfx_view_size_get(widget); \
21 ck_assert(W == sz.w); \
22 ck_assert(H == sz.h); \
23 } while(0);
24
25 TUPLE_CHECK(100, 100);
26 TUPLE_CHECK(100, 200);
27 TUPLE_CHECK(200, 100);
28 TUPLE_CHECK(800, 700);
29 TUPLE_CHECK(10, 50);
30
31#undef TUPLE_CHECK
32}
33EFL_END_TEST
34
35void
36efl_gfx_view_behavior_test(TCase *tc)
37{
38 tcase_add_test(tc, view_size);
39}
diff --git a/src/tests/elementary/spec/efl_ui_spec_suite.h b/src/tests/elementary/spec/efl_ui_spec_suite.h
index 009e4e0ec5..b840adcefd 100644
--- a/src/tests/elementary/spec/efl_ui_spec_suite.h
+++ b/src/tests/elementary/spec/efl_ui_spec_suite.h
@@ -14,6 +14,7 @@ void efl_pack_behavior_test(TCase *tc);
14void efl_pack_linear_behavior_test(TCase *tc); 14void efl_pack_linear_behavior_test(TCase *tc);
15void efl_content_behavior_test(TCase *tc); 15void efl_content_behavior_test(TCase *tc);
16void efl_gfx_arrangement_behavior_test(TCase *tc); 16void efl_gfx_arrangement_behavior_test(TCase *tc);
17void efl_gfx_view_behavior_test(TCase *tc);
17void efl_ui_clickable_behavior_test(TCase *tc); 18void efl_ui_clickable_behavior_test(TCase *tc);
18void efl_ui_format_behavior_test(TCase *tc); 19void efl_ui_format_behavior_test(TCase *tc);
19void efl_ui_range_display_behavior_test(TCase *tc); 20void efl_ui_range_display_behavior_test(TCase *tc);
diff --git a/src/tests/elementary/spec/meson.build b/src/tests/elementary/spec/meson.build
index 0da3494dfd..33be7aa013 100644
--- a/src/tests/elementary/spec/meson.build
+++ b/src/tests/elementary/spec/meson.build
@@ -11,6 +11,7 @@ efl_ui_suite_behavior_test_files = files([
11 'efl_test_single_selectable.c', 11 'efl_test_single_selectable.c',
12 'efl_test_multi_selectable.c', 12 'efl_test_multi_selectable.c',
13 'efl_test_selectable.c', 13 'efl_test_selectable.c',
14 'efl_test_gfx_view.c',
14]) 15])
15 16
16efl_ui_suite_behavior_src = files([ 17efl_ui_suite_behavior_src = files([