Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Startup Init Lite
提交
2fa83a50
S
Startup Init Lite
项目概览
OpenHarmony
/
Startup Init Lite
大约 1 年 前同步成功
通知
3
Star
37
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Startup Init Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2fa83a50
编写于
10月 10, 2022
作者:
C
chengjinsong2
浏览文件
操作
浏览文件
下载
差异文件
Merge branch '1010_API' of
https://gitee.com/chneg-jinsong/startup_init_lite_1
into 1010_API
上级
96a45aec
3d1eeed6
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
8 addition
and
11 deletion
+8
-11
interfaces/kits/jskits/BUILD.gn
interfaces/kits/jskits/BUILD.gn
+1
-3
interfaces/kits/jskits/src_v9/native_parameters_js.cpp
interfaces/kits/jskits/src_v9/native_parameters_js.cpp
+0
-1
test/moduletest/syspara_moduleTest.cpp
test/moduletest/syspara_moduleTest.cpp
+6
-6
test/unittest/syspara/syspara_unittest.cpp
test/unittest/syspara/syspara_unittest.cpp
+1
-1
未找到文件。
interfaces/kits/jskits/BUILD.gn
浏览文件 @
2fa83a50
...
...
@@ -56,9 +56,7 @@ ohos_shared_library("systemparameterv9") {
"//third_party/libuv/include",
]
sources = [
"src_v9/native_parameters_js.cpp",
]
sources = [ "src_v9/native_parameters_js.cpp" ]
deps = [
"//base/startup/init/interfaces/innerkits:libbeget_proxy",
...
...
interfaces/kits/jskits/src_v9/native_parameters_js.cpp
浏览文件 @
2fa83a50
...
...
@@ -150,7 +150,6 @@ static napi_value Set(napi_env env, napi_callback_info info)
napi_value
thisVar
=
nullptr
;
void
*
data
=
nullptr
;
napi_get_cb_info
(
env
,
info
,
&
argc
,
argv
,
&
thisVar
,
&
data
);
PARAM_NAPI_ASSERT
(
env
,
argc
>=
ARGC_NUMBER
,
SYSPARAM_INVALID_INPUT
,
"requires 2 parameter"
);
StorageAsyncContextPtr
asyncContext
=
new
StorageAsyncContext
();
asyncContext
->
env
=
env
;
...
...
test/moduletest/syspara_moduleTest.cpp
浏览文件 @
2fa83a50
...
...
@@ -180,17 +180,17 @@ HWTEST_F(SysparaModuleTest, Syspara_SetParameter_test_005, TestSize.Level0)
char
key1
[]
=
"test.param.name.xxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxx"
;
char
value
[]
=
"test.value.xxxx"
;
int
ret
=
SetParameter
(
key1
,
value
);
EXPECT_EQ
(
ret
,
SYSPARAM_INVALID_INPUT
);
EXPECT_EQ
(
ret
,
EC_INVALID
);
//check param name, Illegal param name
char
key2
[]
=
".test.param.name.xxxxx"
;
ret
=
SetParameter
(
key2
,
value
);
EXPECT_EQ
(
ret
,
SYSPARAM_INVALID_INPUT
);
EXPECT_EQ
(
ret
,
EC_INVALID
);
char
key3
[]
=
"test..param.name.xxxxx"
;
ret
=
SetParameter
(
key3
,
value
);
EXPECT_EQ
(
ret
,
SYSPARAM_INVALID_INPUT
);
EXPECT_EQ
(
ret
,
EC_INVALID
);
char
key4
[]
=
"test..param. .name"
;
ret
=
SetParameter
(
key4
,
value
);
EXPECT_EQ
(
ret
,
SYSPARAM_INVALID_INPUT
);
EXPECT_EQ
(
ret
,
EC_INVALID
);
//check param name, legal param name
char
key5
[]
=
"test.param.name.--__.:::"
;
ret
=
SetParameter
(
key5
,
value
);
...
...
@@ -284,7 +284,7 @@ HWTEST_F(SysparaModuleTest, Syspara_SetParameter_test_007, TestSize.Level0)
}
string
value2
=
"test.param.value.002"
;
ret
=
SetParameter
(
key1
.
c_str
(),
value2
.
c_str
());
EXPECT_EQ
(
ret
,
SYSPARAM_INVALID_INPUT
);
EXPECT_EQ
(
ret
,
EC_INVALID
);
string
key2
=
"ro.param.test"
;
string
value3
=
"test.param.value.003"
;
...
...
@@ -298,7 +298,7 @@ HWTEST_F(SysparaModuleTest, Syspara_SetParameter_test_007, TestSize.Level0)
}
string
value4
=
"test.param.value.004"
;
ret
=
SetParameter
(
key2
.
c_str
(),
value4
.
c_str
());
EXPECT_EQ
(
ret
,
SYSPARAM_INVALID_INPUT
);
EXPECT_EQ
(
ret
,
EC_INVALID
);
GTEST_LOG_
(
INFO
)
<<
"Syspara_SetParameter_test_007 end"
;
}
...
...
test/unittest/syspara/syspara_unittest.cpp
浏览文件 @
2fa83a50
...
...
@@ -264,7 +264,7 @@ HWTEST_F(SysparaUnitTest, parameterTest0012, TestSize.Level0)
ret
=
GetParameterValue
(
handle
,
valueGet1
,
32
);
EXPECT_EQ
(
ret
,
SYSPARAM_NOT_FOUND
);
ret
=
GetParameterName
(
handle
,
nameGet1
,
32
);
EXPECT_EQ
(
ret
,
SYSPARAM_
SYSTEM_ERROR
);
EXPECT_EQ
(
ret
,
SYSPARAM_
NOT_FOUND
);
}
HWTEST_F
(
SysparaUnitTest
,
parameterTest0013
,
TestSize
.
Level0
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录