diff options
author | YoungHun Cho <hoon.cho@samsung.com> | 2017-08-21 15:41:52 +0900 |
---|---|---|
committer | YoungHun Cho <hoon.cho@samsung.com> | 2017-08-21 15:59:32 +0900 |
commit | c34341de985e0d0f983e3de21ccffe517e320c2a (patch) | |
tree | 47ff7ca521eb369d728f38ea5da81b4926e9cec9 /test | |
parent | d26c273ae50a1b2fd9e41220b99feabd32f48d50 (diff) | |
download | w3-home-c34341de985e0d0f983e3de21ccffe517e320c2a.tar.gz w3-home-c34341de985e0d0f983e3de21ccffe517e320c2a.tar.bz2 w3-home-c34341de985e0d0f983e3de21ccffe517e320c2a.zip |
apps focus text : 3 lines
Change-Id: I15c08ad52e59861a6cedde339bf4832efea2ac04
Diffstat (limited to 'test')
-rwxr-xr-x | test/feature_test/feature_test.c | 1 | ||||
-rwxr-xr-x | test/feature_test/feature_test.h | 2 | ||||
-rwxr-xr-x | test/feature_test/group_feature_apps_focus_text.c | 107 | ||||
-rwxr-xr-x | test/test_function.h | 2 |
4 files changed, 112 insertions, 0 deletions
diff --git a/test/feature_test/feature_test.c b/test/feature_test/feature_test.c index 07caaaf..de0b761 100755 --- a/test/feature_test/feature_test.c +++ b/test/feature_test/feature_test.c @@ -39,6 +39,7 @@ void feature_test(void) TEST_GROUP_ADD("group_feature_moments_controls_state", group_feature_moments_controls_state); TEST_GROUP_ADD("group_feature_moments_control_button_status_behavior", group_feature_moments_control_button_status_behavior); TEST_GROUP_ADD("group_feature_moments_center_layout_show", group_feature_moments_center_layout_show); + TEST_GROUP_ADD("group_feature_apps_focus_text", group_feature_apps_focus_text); TEST_RUN(__test_complete_cb); } diff --git a/test/feature_test/feature_test.h b/test/feature_test/feature_test.h index 97867e3..3f5095a 100755 --- a/test/feature_test/feature_test.h +++ b/test/feature_test/feature_test.h @@ -36,6 +36,8 @@ void group_feature_moments_controls_show(unit_group_t * group); void group_feature_moments_controls_state(unit_group_t * group); void group_feature_moments_control_button_status_behavior(unit_group_t * group); void group_feature_moments_center_layout_show(unit_group_t * group); +void group_feature_apps_focus_text(unit_group_t * group); + #endif diff --git a/test/feature_test/group_feature_apps_focus_text.c b/test/feature_test/group_feature_apps_focus_text.c new file mode 100755 index 0000000..1c30b45 --- /dev/null +++ b/test/feature_test/group_feature_apps_focus_text.c @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2016 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "test.h" +#if TEST_MODE + +#include "feature_test.h" +#include "../test_function.h" +#include "apps/apps.h" + +static struct { + unit_group_t * group; +} s_info = { + .group = NULL, +}; + +static void __group_set_up(void) +{ + apps_show(); + + TEST_GROUP_SET_UP_DONE(0.5, s_info.group); +} + +static void __group_tear_down(void) +{ + apps_hide(); + + TEST_GROUP_TEAR_DOWN_DONE(2.0, s_info.group); +} + +static void __set_up(void) +{ + s_info.group->set_up_complete(s_info.group); +} + +static void __tear_down(void) +{ + s_info.group->tear_down_complete(s_info.group); +} + +static unit_case_func_t __continue_case_done(void * data) +{ + TEST_CASE_DONE(s_info.group); +} + +static unit_case_func_t __case_check_one_line(void * data) +{ + __t__set_focus_text("Kkkkkkkk"); + + TEST_CASE_CONTINUE(2.0, __continue_case_done, data); +} + +static unit_case_func_t __case_check_two_line(void * data) +{ + __t__set_focus_text("Kkkkkkkk Kkkkkkkk"); + + TEST_CASE_CONTINUE(2.0, __continue_case_done, data); +} + +static unit_case_func_t __case_check_three_line(void * data) +{ + __t__set_focus_text("Kkkkkkkk Kkkkkkkk Kkkkkkkk"); + + TEST_CASE_CONTINUE(2.0, __continue_case_done, data); +} + +static unit_case_func_t __case_check_four_line(void * data) +{ + __t__set_focus_text("Kkkkkkkk Kkkkkkkk Kkkkkkkk Kkkkkkkk"); + + TEST_CASE_CONTINUE(2.0, __continue_case_done, data); +} + +void group_feature_apps_focus_text(unit_group_t * group) +{ + s_info.group = group; + s_info.group->set_up = __set_up; + s_info.group->tear_down = __tear_down; + + TEST_GROUP_SET_UP(s_info.group, __group_set_up); + TEST_CASE_ADD(s_info.group, __case_check_one_line, NULL); + TEST_CASE_ADD(s_info.group, __case_check_two_line, NULL); + TEST_CASE_ADD(s_info.group, __case_check_three_line, NULL); + TEST_CASE_ADD(s_info.group, __case_check_four_line, NULL); + + TEST_GROUP_TEAR_DOWN(s_info.group, __group_tear_down); + + TEST_GROUP_RUN(s_info.group); +} + + +#endif + + diff --git a/test/test_function.h b/test/test_function.h index b19edbf..955a2ce 100755 --- a/test/test_function.h +++ b/test/test_function.h @@ -89,6 +89,8 @@ extern void __t__set_moments_control_volume_level(int level); extern int __t__get_moments_control_volume_level(); extern void __t__set_moments_control_brightness_level(int level); extern int __t__get_moments_control_brightness_level(void); + +extern void __t__set_focus_text(char *label); #endif #endif |