Skip to content
GitLab
LSCloud-logo1
Created with Sketch.
LSCloud-logo2
Created with Sketch.
项目
项目组
代码片段
帮助
正在加载...
帮助
关于聆思
登录
切换导航
D
duomotai_ap
项目概览
项目概览
详情
动态
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
合并请求
12
合并请求
12
CI / CD
CI / CD
流水线
作业
计划
小工具
烧录包信息打印
烧录包校验
烧录包打包
生成LPK包
收起侧边栏
关闭侧边栏
动态
分支图
作业
提交
打开侧边栏
Duomotai
duomotai_ap
提交
64745eac
提交
64745eac
编写于
11个月前
作者:
徐宪辉
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat[ui]: Not clean all widgets in adding custom view
Signed-off-by:
徐宪辉
<
xhxu@listenai.com
>
上级
c3fc10be
流水线
#14924
已通过 ,包含阶段
in 3 minute 和 4 second
变更
3
流水线
1
Hide whitespace changes
内联
并排
3 个文件被修改
(
49 行新增
以及
2 行删除
)
+49
-2
apps/factory_test/src/common/ui_common/ui_common.c
apps/factory_test/src/common/ui_common/ui_common.c
+8
-1
apps/factory_test/src/common/ui_common/ui_common.h
apps/factory_test/src/common/ui_common/ui_common.h
+2
-0
tests/factory_test/common/ui_common/src/test_ui_common.c
tests/factory_test/common/ui_common/src/test_ui_common.c
+39
-1
未找到文件。
apps/factory_test/src/common/ui_common/ui_common.c
浏览文件 @
64745eac
...
...
@@ -249,6 +249,14 @@ void ui_common_set_confirm_btn_click_listener(ui_common_btn_click_listener liste
}
void
ui_common_clean_all_widgets
(
void
)
{
ui_mutex_lock
();
clean_all_widgets_in_root_view
();
ui_mutex_unlock
();
}
int
ui_common_add_custom_view
(
ui_common_custom_view_type_t
type
,
ui_common_custom_view_func
func
)
{
int
ret
=
-
1
;
...
...
@@ -260,7 +268,6 @@ int ui_common_add_custom_view(ui_common_custom_view_type_t type, ui_common_custo
{
case
UI_COMMON_CUSTOM_VIEW_TYPE_LVGL
:
ui_mutex_lock
();
clean_all_widgets_in_root_view
();
func
(
lv_root_view
);
ui_mutex_unlock
();
break
;
...
...
This diff is collapsed.
Click to expand it.
apps/factory_test/src/common/ui_common/ui_common.h
浏览文件 @
64745eac
...
...
@@ -68,6 +68,8 @@ void ui_common_set_cancel_btn_click_listener(ui_common_btn_click_listener listen
int
ui_common_add_custom_view
(
ui_common_custom_view_type_t
type
,
ui_common_custom_view_func
func
);
void
ui_common_clean_all_widgets
(
void
);
void
ui_common_remove_confirm_btn_click_listener
(
void
);
void
ui_common_remove_cancel_btn_click_listener
(
void
);
...
...
This diff is collapsed.
Click to expand it.
tests/factory_test/common/ui_common/src/test_ui_common.c
浏览文件 @
64745eac
...
...
@@ -111,7 +111,7 @@ ZTEST(ui_common, test_add_custom_view_called_ui_mutex)
zassert_equal
(
1
,
ui_mutex_unlock_fake
.
call_count
,
"actual size: %d"
,
ui_mutex_unlock_fake
.
call_count
);
}
ZTEST
(
ui_common
,
test_add_custom_view_called_lv_obj_clean
)
ZTEST
(
ui_common
,
test_add_custom_view_
not_
called_lv_obj_clean
)
{
int
ret
=
0
;
...
...
@@ -128,7 +128,45 @@ ZTEST(ui_common, test_add_custom_view_called_lv_obj_clean)
ret
=
ui_common_add_custom_view
(
type
,
custom_view_func
);
zassert_equal
(
0
,
lv_obj_clean_fake
.
call_count
,
"actual size: %d"
,
lv_obj_clean_fake
.
call_count
);
}
ZTEST
(
ui_common
,
test_ui_common_clean_all_widgets_called_lv_obj_clean
)
{
int
ret
=
0
;
ui_common_config_t
config
=
{
.
texts
.
manual_check_test_result_label_text
=
"label"
,
.
texts
.
manual_check_test_result_confirm_btn_text
=
"Yes"
,
.
texts
.
manual_check_test_result_cancel_btn_text
=
"No"
,
};
ret
=
ui_common_create
(
&
config
);
mock_ui_mutex_reset
();
ui_common_clean_all_widgets
();
zassert_equal
(
1
,
lv_obj_clean_fake
.
call_count
,
"actual size: %d"
,
lv_obj_clean_fake
.
call_count
);
}
ZTEST
(
ui_common
,
test_ui_common_clean_all_widgets_called_ui_mutex
)
{
int
ret
=
0
;
ui_common_config_t
config
=
{
.
texts
.
manual_check_test_result_label_text
=
"label"
,
.
texts
.
manual_check_test_result_confirm_btn_text
=
"Yes"
,
.
texts
.
manual_check_test_result_cancel_btn_text
=
"No"
,
};
ret
=
ui_common_create
(
&
config
);
mock_ui_mutex_reset
();
ui_common_clean_all_widgets
();
zassert_equal
(
1
,
ui_mutex_lock_fake
.
call_count
,
"actual size: %d"
,
ui_mutex_lock_fake
.
call_count
);
zassert_equal
(
1
,
ui_mutex_unlock_fake
.
call_count
,
"actual size: %d"
,
ui_mutex_unlock_fake
.
call_count
);
}
ZTEST
(
ui_common
,
test_handle_progress_status_with_not_exist_type_not_clean_obj
)
...
...
This diff is collapsed.
Click to expand it.
编辑
预览
支持
Markdown
0%
请重试
or
添加新附件
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录