Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
9fc411ae
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
接近 1 年 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
9fc411ae
编写于
4月 21, 2022
作者:
O
openharmony_ci
提交者:
Gitee
4月 21, 2022
浏览文件
操作
浏览文件
下载
差异文件
!3006 modify resource value to 3.1 rls
Merge pull request !3006 from 杨清/cherry-pick-1650423541
上级
c9230af4
2a69e662
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
31 addition
and
7 deletion
+31
-7
global/resmgr_standard/resmgrjs/src/main/js/default/test/Resmgr.test.js
...standard/resmgrjs/src/main/js/default/test/Resmgr.test.js
+31
-7
未找到文件。
global/resmgr_standard/resmgrjs/src/main/js/default/test/Resmgr.test.js
浏览文件 @
9fc411ae
...
@@ -75,6 +75,8 @@ describe('resMgrTest', function () {
...
@@ -75,6 +75,8 @@ describe('resMgrTest', function () {
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
mgr
.
getString
(
0x1000000
,
(
err
,
value
)
=>
{
mgr
.
getString
(
0x1000000
,
(
err
,
value
)
=>
{
expect
(
value
!==
null
).
assertTrue
();
expect
(
value
!==
null
).
assertTrue
();
console
.
log
(
'
getString_test_001
'
+
value
);
expect
(
value
).
assertEqual
(
'
L2Test
'
);
})
})
})
})
done
();
done
();
...
@@ -89,6 +91,8 @@ describe('resMgrTest', function () {
...
@@ -89,6 +91,8 @@ describe('resMgrTest', function () {
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
mgr
.
getString
(
0x1000000
).
then
(
value
=>
{
mgr
.
getString
(
0x1000000
).
then
(
value
=>
{
expect
(
value
!==
null
).
assertTrue
();
expect
(
value
!==
null
).
assertTrue
();
console
.
log
(
'
getString_test_002
'
+
value
);
expect
(
value
).
assertEqual
(
'
L2Test
'
);
})
})
})
})
done
();
done
();
...
@@ -103,6 +107,14 @@ describe('resMgrTest', function () {
...
@@ -103,6 +107,14 @@ describe('resMgrTest', function () {
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
mgr
.
getStringArray
(
0x1000002
,
(
err
,
value
)
=>
{
mgr
.
getStringArray
(
0x1000002
,
(
err
,
value
)
=>
{
expect
(
value
!==
null
).
assertTrue
();
expect
(
value
!==
null
).
assertTrue
();
console
.
log
(
'
getStringArray_test_001
'
+
value
);
console
.
log
(
'
getStringArray_test_001
'
+
value
.
length
);
console
.
log
(
'
getStringArray_test_001
'
+
value
[
0
]);
expect
(
value
.
length
).
assertEqual
(
4
);
expect
(
value
[
0
]).
assertEqual
(
'
small
'
);
expect
(
value
[
1
]).
assertEqual
(
'
middle
'
);
expect
(
value
[
2
]).
assertEqual
(
'
large
'
);
expect
(
value
[
3
]).
assertEqual
(
'
extra large
'
);
})
})
})
})
done
();
done
();
...
@@ -117,6 +129,14 @@ describe('resMgrTest', function () {
...
@@ -117,6 +129,14 @@ describe('resMgrTest', function () {
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
mgr
.
getStringArray
(
0x1000002
).
then
(
value
=>
{
mgr
.
getStringArray
(
0x1000002
).
then
(
value
=>
{
expect
(
value
!==
null
).
assertTrue
();
expect
(
value
!==
null
).
assertTrue
();
console
.
log
(
'
getStringArray_test_002
'
+
value
);
console
.
log
(
'
getStringArray_test_002
'
+
value
.
length
);
console
.
log
(
'
getStringArray_test_002
'
+
value
[
0
]);
expect
(
value
.
length
).
assertEqual
(
4
);
expect
(
value
[
0
]).
assertEqual
(
'
small
'
);
expect
(
value
[
1
]).
assertEqual
(
'
middle
'
);
expect
(
value
[
2
]).
assertEqual
(
'
large
'
);
expect
(
value
[
3
]).
assertEqual
(
'
extra large
'
);
})
})
})
})
done
();
done
();
...
@@ -159,6 +179,7 @@ describe('resMgrTest', function () {
...
@@ -159,6 +179,7 @@ describe('resMgrTest', function () {
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
mgr
.
getMediaBase64
(
0x1000004
,
(
err
,
value
)
=>
{
mgr
.
getMediaBase64
(
0x1000004
,
(
err
,
value
)
=>
{
expect
(
value
.
length
>
0
).
assertTrue
();
expect
(
value
.
length
>
0
).
assertTrue
();
console
.
log
(
'
getMediaBase64_test_001
'
+
value
);
})
})
})
})
done
();
done
();
...
@@ -173,6 +194,7 @@ describe('resMgrTest', function () {
...
@@ -173,6 +194,7 @@ describe('resMgrTest', function () {
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
mgr
.
getMediaBase64
(
0x1000004
).
then
(
value
=>
{
mgr
.
getMediaBase64
(
0x1000004
).
then
(
value
=>
{
expect
(
value
.
length
>
0
).
assertTrue
();
expect
(
value
.
length
>
0
).
assertTrue
();
console
.
log
(
'
getMediaBase64_test_002
'
+
value
);
})
})
})
})
done
();
done
();
...
@@ -260,6 +282,7 @@ describe('resMgrTest', function () {
...
@@ -260,6 +282,7 @@ describe('resMgrTest', function () {
mgr
.
getPluralString
(
0x1000003
,
1
,
(
error
,
value
)
=>
{
mgr
.
getPluralString
(
0x1000003
,
1
,
(
error
,
value
)
=>
{
expect
(
value
!==
null
).
assertTrue
();
expect
(
value
!==
null
).
assertTrue
();
console
.
log
(
'
getPluralString_test_001
'
+
value
);
console
.
log
(
'
getPluralString_test_001
'
+
value
);
expect
(
value
).
assertEqual
(
'
1 test other
'
);
})
})
})
})
done
();
done
();
...
@@ -275,6 +298,7 @@ describe('resMgrTest', function () {
...
@@ -275,6 +298,7 @@ describe('resMgrTest', function () {
mgr
.
getPluralString
(
0x1000003
,
1
).
then
(
value
=>
{
mgr
.
getPluralString
(
0x1000003
,
1
).
then
(
value
=>
{
expect
(
value
!==
null
).
assertTrue
();
expect
(
value
!==
null
).
assertTrue
();
console
.
log
(
'
getPluralString_test_002
'
+
value
);
console
.
log
(
'
getPluralString_test_002
'
+
value
);
expect
(
value
).
assertEqual
(
'
1 test other
'
);
})
})
})
})
done
();
done
();
...
@@ -287,10 +311,10 @@ describe('resMgrTest', function () {
...
@@ -287,10 +311,10 @@ describe('resMgrTest', function () {
*/
*/
it
(
'
getString_test_003
'
,
0
,
async
function
(
done
)
{
it
(
'
getString_test_003
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
mgr
.
getString
(
0x
7000000
,
(
err
,
value
)
=>
{
mgr
.
getString
(
0x
1000001
,
(
err
,
value
)
=>
{
expect
(
value
!==
null
).
assertTrue
();
expect
(
value
!==
null
).
assertTrue
();
console
.
log
(
'
getString_test_003
'
+
value
);
console
.
log
(
'
getString_test_003
'
+
value
);
expect
(
value
).
assertEqual
(
'
hello world!
'
);
expect
(
value
).
assertEqual
(
'
JS_Phone_Empty Feature Ability
'
);
})
})
})
})
done
();
done
();
...
@@ -355,8 +379,8 @@ describe('resMgrTest', function () {
...
@@ -355,8 +379,8 @@ describe('resMgrTest', function () {
expect
(
rawfile
!==
null
).
assertTrue
();
expect
(
rawfile
!==
null
).
assertTrue
();
console
.
log
(
'
getRawFileDescriptor_test_001--
'
console
.
log
(
'
getRawFileDescriptor_test_001--
'
+
'
fd:
'
+
fdValue
+
'
fd:
'
+
fdValue
+
'
offset:
'
+
offsetValue
+
'
offset:
'
+
offsetValue
+
'
length:
'
+
lengthValue
);
+
'
length:
'
+
lengthValue
);
})
})
})
})
done
();
done
();
...
@@ -377,8 +401,8 @@ describe('resMgrTest', function () {
...
@@ -377,8 +401,8 @@ describe('resMgrTest', function () {
console
.
log
(
'
getRawFileDescriptor_test_002--
'
+
rawfile
);
console
.
log
(
'
getRawFileDescriptor_test_002--
'
+
rawfile
);
console
.
log
(
'
getRawFileDescriptor_test_002--
'
console
.
log
(
'
getRawFileDescriptor_test_002--
'
+
'
fd:
'
+
rawfile
.
fd
+
'
fd:
'
+
rawfile
.
fd
+
'
offset:
'
+
rawfile
.
offset
+
'
offset:
'
+
rawfile
.
offset
+
'
length:
'
+
rawfile
.
length
);
+
'
length:
'
+
rawfile
.
length
);
})
})
})
})
done
();
done
();
...
@@ -415,4 +439,4 @@ describe('resMgrTest', function () {
...
@@ -415,4 +439,4 @@ describe('resMgrTest', function () {
})
})
console
.
log
(
'
*************end ResmgrTest*************
'
);
console
.
log
(
'
*************end ResmgrTest*************
'
);
})
})
\ No newline at end of file
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录