Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
5a0e07e3
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看板
提交
5a0e07e3
编写于
7月 30, 2021
作者:
O
openharmony_ci
提交者:
Gitee
7月 30, 2021
浏览文件
操作
浏览文件
下载
差异文件
!363 modify testcase to async function(done)
Merge pull request !363 from 杨清/0720
上级
848036ea
2dfbfbee
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
36 addition
and
18 deletion
+36
-18
global/resmgr_standard/resmgrjs/project/entry/src/main/js/test/Resmgr.test.js
...rd/resmgrjs/project/entry/src/main/js/test/Resmgr.test.js
+36
-18
未找到文件。
global/resmgr_standard/resmgrjs/project/entry/src/main/js/test/Resmgr.test.js
浏览文件 @
5a0e07e3
...
...
@@ -23,10 +23,11 @@ describe('resMgrTest', function () {
* @tc.name test getResourceManager method in callback mode
* @tc.desc get the resource manager in callback mode
*/
it
(
'
getResourceManager_test_001
'
,
0
,
function
(
)
{
it
(
'
getResourceManager_test_001
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
expect
(
mgr
!=
null
).
assertTrue
();
})
done
();
})
/* *
...
...
@@ -34,10 +35,11 @@ describe('resMgrTest', function () {
* @tc.name test getResourceManager method in callback mode with bundlename
* @tc.desc get the resource manager in callback mode with bundlename
*/
it
(
'
getResourceManager_test_002
'
,
0
,
function
(
)
{
it
(
'
getResourceManager_test_002
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
(
"
com.ohos.settings
"
,
(
error
,
mgr
)
=>
{
expect
(
mgr
!=
null
).
assertTrue
();
})
done
();
})
/* *
...
...
@@ -45,10 +47,11 @@ describe('resMgrTest', function () {
* @tc.name test getResourceManager method in promise mode
* @tc.desc get the resource manager in promise mode
*/
it
(
'
getResourceManager_test_00
1
'
,
0
,
function
(
)
{
it
(
'
getResourceManager_test_00
3
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
().
then
(
mgr
=>
{
expect
(
mgr
!=
null
).
assertTrue
();
})
done
();
})
/* *
...
...
@@ -56,10 +59,11 @@ describe('resMgrTest', function () {
* @tc.name test getResourceManager method in promise mode with bundlename
* @tc.desc get the resource manager in promise mode with bundlename
*/
it
(
'
getResourceManager_test_00
2
'
,
0
,
function
(
)
{
it
(
'
getResourceManager_test_00
4
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
(
"
com.ohos.settings
"
).
then
(
mgr
=>
{
expect
(
mgr
!=
null
).
assertTrue
();
})
done
();
})
/* *
...
...
@@ -67,12 +71,13 @@ describe('resMgrTest', function () {
* @tc.name test getString method in callback mode
* @tc.desc get the string in callback mode
*/
it
(
'
getString_test_001
'
,
0
,
function
(
)
{
it
(
'
getString_test_001
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
mgr
.
getString
(
0x1000000
,
(
err
,
value
)
=>
{
expect
(
value
!=
null
).
assertTrue
();
})
})
done
();
})
/* *
...
...
@@ -80,12 +85,13 @@ describe('resMgrTest', function () {
* @tc.name test getString method in promise mode
* @tc.desc get the string in promise mode
*/
it
(
'
getString_test_002
'
,
0
,
function
(
)
{
it
(
'
getString_test_002
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
mgr
.
getString
(
0x1000000
).
then
(
value
=>
{
expect
(
value
!=
null
).
assertTrue
();
})
})
done
();
})
/* *
...
...
@@ -93,12 +99,13 @@ describe('resMgrTest', function () {
* @tc.name test getStringArray method in callback mode
* @tc.desc get the string array in callback mode
*/
it
(
'
getStringArray_test_001
'
,
0
,
function
(
)
{
it
(
'
getStringArray_test_001
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
mgr
.
getStringArray
(
0x1000002
,
(
err
,
value
)
=>
{
expect
(
value
!=
null
).
assertTrue
();
})
})
done
();
})
/* *
...
...
@@ -106,12 +113,13 @@ describe('resMgrTest', function () {
* @tc.name test getStringArray method in promise mode
* @tc.desc get the string array in promise mode
*/
it
(
'
getStringArray_test_002
'
,
0
,
function
(
)
{
it
(
'
getStringArray_test_002
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
mgr
.
getStringArray
(
0x1000002
).
then
(
value
=>
{
expect
(
value
!=
null
).
assertTrue
();
})
})
done
();
})
/* *
...
...
@@ -119,12 +127,13 @@ describe('resMgrTest', function () {
* @tc.name test getMedia method in callback mode
* @tc.desc get the media in callback mode
*/
it
(
'
getMedia_test_001
'
,
0
,
function
(
)
{
it
(
'
getMedia_test_001
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
mgr
.
getMedia
(
0x1000004
,
(
err
,
value
)
=>
{
expect
(
value
.
length
>
0
).
assertTrue
();
})
})
done
();
})
/* *
...
...
@@ -132,12 +141,13 @@ describe('resMgrTest', function () {
* @tc.name test getMedia method in promise mode
* @tc.desc get the media in promise mode
*/
it
(
'
getMedia_test_002
'
,
0
,
function
(
)
{
it
(
'
getMedia_test_002
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
mgr
.
getMedia
(
0x1000004
).
then
(
value
=>
{
expect
(
value
.
length
>
0
).
assertTrue
();
})
})
done
();
})
/* *
...
...
@@ -145,12 +155,13 @@ describe('resMgrTest', function () {
* @tc.name test getMediaBase64 method in callback mode
* @tc.desc get the media base64 in callback mode
*/
it
(
'
getMediaBase64_test_001
'
,
0
,
function
(
)
{
it
(
'
getMediaBase64_test_001
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
mgr
.
getMediaBase64
(
0x1000004
,
(
err
,
value
)
=>
{
expect
(
value
.
length
>
0
).
assertTrue
();
})
})
done
();
})
/* *
...
...
@@ -158,12 +169,13 @@ describe('resMgrTest', function () {
* @tc.name test getMediaBase64 method in promise mode
* @tc.desc get the media base64 in promise mode
*/
it
(
'
getMediaBase64_test_002
'
,
0
,
function
(
)
{
it
(
'
getMediaBase64_test_002
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
mgr
.
getMediaBase64
(
0x1000004
).
then
(
value
=>
{
expect
(
value
.
length
>
0
).
assertTrue
();
})
})
done
();
})
/* *
...
...
@@ -171,12 +183,13 @@ describe('resMgrTest', function () {
* @tc.name test getConfiguration method in callback mode
* @tc.desc get the configuration in callback mode
*/
it
(
'
getConfiguration_test_001
'
,
0
,
function
(
)
{
it
(
'
getConfiguration_test_001
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
mgr
.
getConfiguration
((
error
,
cfg
)
=>
{
expect
(
cfg
!=
null
).
assertTrue
();
})
})
done
();
})
/* *
...
...
@@ -184,12 +197,13 @@ describe('resMgrTest', function () {
* @tc.name test getConfiguration method in promise mode
* @tc.desc get the configuration in promise mode
*/
it
(
'
getConfiguration_test_002
'
,
0
,
function
(
)
{
it
(
'
getConfiguration_test_002
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
mgr
.
getConfiguration
().
then
(
cfg
=>
{
expect
(
cfg
!=
null
).
assertTrue
();
})
})
done
();
})
/* *
...
...
@@ -197,12 +211,13 @@ describe('resMgrTest', function () {
* @tc.name test getDeviceCapability method in callback mode
* @tc.desc get the device capability in callback mode
*/
it
(
'
getDeviceCapability_test_001
'
,
0
,
function
(
)
{
it
(
'
getDeviceCapability_test_001
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
mgr
.
getDeviceCapability
((
error
,
dc
)
=>
{
expect
(
dc
!=
null
).
assertTrue
();
})
})
done
();
})
/* *
...
...
@@ -210,12 +225,13 @@ describe('resMgrTest', function () {
* @tc.name test getDeviceCapability method in promise mode
* @tc.desc get the device capability in promise mode
*/
it
(
'
getDeviceCapability_test_002
'
,
0
,
function
(
)
{
it
(
'
getDeviceCapability_test_002
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
mgr
.
getDeviceCapability
().
then
(
dc
=>
{
expect
(
dc
!=
null
).
assertTrue
();
})
})
done
();
})
/* *
...
...
@@ -223,12 +239,13 @@ describe('resMgrTest', function () {
* @tc.name test getPluralString method in callback mode
* @tc.desc get the plural string in callback mode
*/
it
(
'
getPluralString_test_001
'
,
0
,
function
(
)
{
it
(
'
getPluralString_test_001
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
mgr
.
getPluralString
(
0x1000003
,
1
,
(
error
,
value
)
=>
{
expect
(
value
!=
null
).
assertTrue
();
})
})
done
();
})
/* *
...
...
@@ -236,11 +253,12 @@ describe('resMgrTest', function () {
* @tc.name test getPluralString method in promise mode
* @tc.desc get the plural string in promise mode
*/
it
(
'
getPluralString_test_002
'
,
0
,
function
(
)
{
it
(
'
getPluralString_test_002
'
,
0
,
async
function
(
done
)
{
resmgr
.
getResourceManager
((
error
,
mgr
)
=>
{
mgr
.
getPluralString
(
0x1000003
,
1
).
then
(
value
=>
{
expect
(
value
!=
null
).
assertTrue
();
})
})
done
();
})
})
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录