Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
341c41dd
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看板
提交
341c41dd
编写于
4月 12, 2023
作者:
Q
qinliwen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
<删除冗余无效用例>
Signed-off-by:
N
qinliwen
<
qinliwen3@huawei.com
>
上级
9f1d9ce4
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
0 addition
and
347 deletion
+0
-347
multimedia/audio/audio_js_standard/AudioEventManagement/src/main/js/test/AudioEventManagement.test.js
...tManagement/src/main/js/test/AudioEventManagement.test.js
+0
-347
未找到文件。
multimedia/audio/audio_js_standard/AudioEventManagement/src/main/js/test/AudioEventManagement.test.js
浏览文件 @
341c41dd
...
...
@@ -34,7 +34,6 @@ describe('audioEventManagement', function () {
console
.
info
(
`
${
TagFrmwk
}
: getAudioManger : FAIL`
);
}
}
function
displayDeviceProp
(
value
,
index
,
array
)
{
let
devRoleName
;
let
devTypeName
;
if
(
value
.
deviceRole
==
1
)
{
...
...
@@ -92,353 +91,7 @@ describe('audioEventManagement', function () {
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_PR_GETDEVICES_OUTPUT_0100
*@tc.name : getDevices - Output device - Promise - ENAME
*@tc.desc : getDevices - Output device
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 0
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_MANAGER_PR_GETDEVICES_OUTPUT_0100
'
,
0
,
async
function
(
done
)
{
const
PROMISE
=
audioManager
.
getDevices
(
audio
.
DeviceFlag
.
OUTPUT_DEVICES_FLAG
)
PROMISE
.
then
(
function
(
value
)
{
console
.
info
(
`
${
TagFrmwk
}
: Promise: getDevices OUTPUT_DEVICES_FLAG`
);
value
.
forEach
(
displayDeviceProp
);
if
(
deviceTypeValue
!=
null
&&
deviceRoleValue
!=
null
)
{
console
.
info
(
`
${
TagFrmwk
}
: Promise: getDevices : OUTPUT_DEVICES_FLAG : PASS`
);
expect
(
true
).
assertTrue
();
}
else
{
console
.
info
(
`
${
TagFrmwk
}
: Promise: getDevices : OUTPUT_DEVICES_FLAG : FAIL`
);
expect
(
false
).
assertTrue
();
}
});
await
PROMISE
;
done
();
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_PR_GETDEVICES_OUTPUT_ENUM_0100
*@tc.name : getDevices - Output device - Promise - ENUM
*@tc.desc : getDevices - Output device
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 0
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_MANAGER_PR_GETDEVICES_OUTPUT_ENUM_0100
'
,
0
,
async
function
(
done
)
{
const
PROMISE
=
audioManager
.
getDevices
(
1
)
PROMISE
.
then
(
function
(
value
)
{
console
.
info
(
`
${
TagFrmwk
}
: Promise: getDevices OUTPUT_DEVICES_FLAG`
);
value
.
forEach
(
displayDeviceProp
);
if
(
deviceTypeValue
!=
null
&&
deviceRoleValue
!=
null
)
{
console
.
info
(
`
${
TagFrmwk
}
: Promise: getDevices : OUTPUT_DEVICES_FLAG : PASS`
);
expect
(
true
).
assertTrue
();
}
else
{
console
.
info
(
`
${
TagFrmwk
}
: Promise: getDevices : OUTPUT_DEVICES_FLAG : FAIL`
);
expect
(
false
).
assertTrue
();
}
});
await
PROMISE
;
done
();
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_PR_GETDEVICES_INPUT_0100
*@tc.name : getDevices - Input device - Promise - ENAME
*@tc.desc : getDevices - Input device
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 0
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_MANAGER_PR_GETDEVICES_INPUT_0100
'
,
0
,
async
function
(
done
)
{
const
PROMISE
=
audioManager
.
getDevices
(
audio
.
DeviceFlag
.
INPUT_DEVICES_FLAG
);
PROMISE
.
then
(
function
(
value
)
{
console
.
info
(
`
${
TagFrmwk
}
: Promise: getDevices INPUT_DEVICES_FLAG`
);
value
.
forEach
(
displayDeviceProp
);
if
(
deviceTypeValue
!=
null
&&
deviceRoleValue
!=
null
)
{
console
.
info
(
`
${
TagFrmwk
}
: Promise: getDevices : INPUT_DEVICES_FLAG : PASS`
);
expect
(
true
).
assertTrue
();
}
else
{
console
.
info
(
`
${
TagFrmwk
}
: Promise: getDevices : INPUT_DEVICES_FLAG : FAIL`
);
expect
(
false
).
assertTrue
();
}
});
await
PROMISE
;
done
();
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_PR_GETDEVICES_INTPUT_ENUM_0100
*@tc.name : getDevices - Input device - Promise - ENUM
*@tc.desc : getDevices - Input device
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 0
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_MANAGER_PR_GETDEVICES_INTPUT_ENUM_0100
'
,
0
,
async
function
(
done
)
{
const
PROMISE
=
audioManager
.
getDevices
(
2
);
PROMISE
.
then
(
function
(
value
)
{
console
.
info
(
`
${
TagFrmwk
}
: Promise: getDevices INPUT_DEVICES_FLAG`
);
value
.
forEach
(
displayDeviceProp
);
if
(
deviceTypeValue
!=
null
&&
deviceRoleValue
!=
null
)
{
console
.
info
(
`
${
TagFrmwk
}
: Promise: getDevices : INPUT_DEVICES_FLAG : PASS`
);
expect
(
true
).
assertTrue
();
}
else
{
console
.
info
(
`
${
TagFrmwk
}
: Promise: getDevices : INPUT_DEVICES_FLAG : FAIL`
);
expect
(
false
).
assertTrue
();
}
});
await
PROMISE
;
done
();
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_PR_GETDEVICES_ALL_0100
*@tc.name : getDevices - ALL device - Promise - ENAME
*@tc.desc : getDevices - ALL device
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 0
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_MANAGER_PR_GETDEVICES_ALL_0100
'
,
0
,
async
function
(
done
)
{
const
PROMISE
=
audioManager
.
getDevices
(
audio
.
DeviceFlag
.
ALL_DEVICES_FLAG
);
PROMISE
.
then
(
function
(
value
)
{
console
.
info
(
`
${
TagFrmwk
}
: Promise: getDevices ALL_DEVICES_FLAG`
);
value
.
forEach
(
displayDeviceProp
);
if
(
deviceTypeValue
!=
null
&&
deviceRoleValue
!=
null
)
{
console
.
info
(
`
${
TagFrmwk
}
: Promise: getDevices : ALL_DEVICES_FLAG : PASS`
);
expect
(
true
).
assertTrue
();
}
else
{
console
.
info
(
`
${
TagFrmwk
}
: Promise: getDevices : ALL_DEVICES_FLAG : FAIL`
);
expect
(
false
).
assertTrue
();
}
});
await
PROMISE
;
done
();
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_PR_GETDEVICES_ALL_ENUM_0100
*@tc.name : getDevices - ALL device - Promise - ENUM
*@tc.desc : getDevices - ALL device
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 0
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_MANAGER_PR_GETDEVICES_ALL_ENUM_0100
'
,
0
,
async
function
(
done
)
{
const
PROMISE
=
audioManager
.
getDevices
(
3
);
PROMISE
.
then
(
function
(
value
)
{
console
.
info
(
`
${
TagFrmwk
}
: Promise: getDevices ALL_DEVICES_FLAG`
);
value
.
forEach
(
displayDeviceProp
);
if
(
deviceTypeValue
!=
null
&&
deviceRoleValue
!=
null
)
{
console
.
info
(
`
${
TagFrmwk
}
: Promise: getDevices : ALL_DEVICES_FLAG : PASS`
);
expect
(
true
).
assertTrue
();
}
else
{
console
.
info
(
`
${
TagFrmwk
}
: Promise: getDevices : ALL_DEVICES_FLAG : FAIL`
);
expect
(
false
).
assertTrue
();
}
});
await
PROMISE
;
done
();
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_CB_GETDEVICES_OUTPUT_0100
*@tc.name : getDevices - Output device - Callback - ENAME
*@tc.desc : getDevices - Output device
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 0
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_MANAGER_CB_GETDEVICES_OUTPUT_0100
'
,
0
,
function
(
done
)
{
audioManager
.
getDevices
(
audio
.
DeviceFlag
.
OUTPUT_DEVICES_FLAG
,
(
err
,
value
)
=>
{
console
.
info
(
`
${
TagFrmwk
}
: Callback: getDevices OUTPUT_DEVICES_FLAG`
);
if
(
err
)
{
console
.
error
(
`
${
TagFrmwk
}
: Callback: OUTPUT_DEVICES_FLAG: failed to get devices
${
err
.
message
}
`
);
expect
().
assertFail
();
}
else
{
console
.
info
(
`
${
TagFrmwk
}
: Callback: getDevices OUTPUT_DEVICES_FLAG`
);
value
.
forEach
(
displayDeviceProp
);
if
(
deviceTypeValue
!=
null
&&
deviceRoleValue
!=
null
)
{
console
.
info
(
`
${
TagFrmwk
}
: Callback: getDevices : OUTPUT_DEVICES_FLAG : PASS`
);
expect
(
true
).
assertTrue
();
}
else
{
console
.
info
(
`
${
TagFrmwk
}
: Callback: getDevices : OUTPUT_DEVICES_FLAG : FAIL`
);
expect
(
false
).
assertTrue
();
}
}
done
();
});
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_CB_GETDEVICES_OUTPUT_ENUM_0100
*@tc.name : getDevices - Output device - Callback - ENUM
*@tc.desc : getDevices - Output device
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_MANAGER_CB_GETDEVICES_OUTPUT_ENUM_0100
'
,
2
,
function
(
done
)
{
audioManager
.
getDevices
(
1
,
(
err
,
value
)
=>
{
console
.
info
(
`
${
TagFrmwk
}
: Callback: getDevices OUTPUT_DEVICES_FLAG`
);
if
(
err
)
{
console
.
error
(
`
${
TagFrmwk
}
: Callback: OUTPUT_DEVICES_FLAG: failed to get devices
${
err
.
message
}
`
);
expect
().
assertFail
();
}
else
{
console
.
info
(
`
${
TagFrmwk
}
: Callback: getDevices OUTPUT_DEVICES_FLAG`
);
value
.
forEach
(
displayDeviceProp
);
if
(
deviceTypeValue
!=
null
&&
deviceRoleValue
!=
null
)
{
console
.
info
(
`
${
TagFrmwk
}
: Callback: getDevices : OUTPUT_DEVICES_FLAG : PASS`
);
expect
(
true
).
assertTrue
();
}
else
{
console
.
info
(
`
${
TagFrmwk
}
: Callback: getDevices : OUTPUT_DEVICES_FLAG : FAIL`
);
expect
(
false
).
assertTrue
();
}
}
done
();
});
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_CB_GETDEVICES_INPUT_0100
*@tc.name : getDevices - Input device - Callback - ENAME
*@tc.desc : getDevices - Input device
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 0
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_MANAGER_CB_GETDEVICES_INPUT_0100
'
,
0
,
function
(
done
)
{
audioManager
.
getDevices
(
audio
.
DeviceFlag
.
INPUT_DEVICES_FLAG
,
(
err
,
value
)
=>
{
console
.
info
(
`
${
TagFrmwk
}
: Callback: getDevices INPUT_DEVICES_FLAG`
);
if
(
err
)
{
console
.
error
(
`
${
TagFrmwk
}
: Callback: INPUT_DEVICES_FLAG: failed to get devices
${
err
.
message
}
`
);
expect
().
assertFail
();
}
else
{
console
.
info
(
`
${
TagFrmwk
}
: Callback: getDevices INPUT_DEVICES_FLAG`
);
value
.
forEach
(
displayDeviceProp
);
if
(
deviceTypeValue
!=
null
&&
deviceRoleValue
!=
null
)
{
console
.
info
(
`
${
TagFrmwk
}
: Callback: getDevices : INPUT_DEVICES_FLAG: PASS`
);
expect
(
true
).
assertTrue
();
}
else
{
console
.
info
(
`
${
TagFrmwk
}
: Callback: getDevices : INPUT_DEVICES_FLAG: FAIL`
);
expect
(
false
).
assertTrue
();
}
}
done
();
});
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_CB_GETDEVICES_INPUT_ENUM_0100
*@tc.name : getDevices - Input device - Callback - ENUM
*@tc.desc : getDevices - Input device
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 0
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_MANAGER_CB_GETDEVICES_INPUT_ENUM_0100
'
,
0
,
function
(
done
)
{
audioManager
.
getDevices
(
2
,
(
err
,
value
)
=>
{
console
.
info
(
`
${
TagFrmwk
}
: Callback: getDevices INPUT_DEVICES_FLAG`
);
if
(
err
)
{
console
.
error
(
`
${
TagFrmwk
}
: Callback: INPUT_DEVICES_FLAG: failed to get devices
${
err
.
message
}
`
);
expect
().
assertFail
();
}
else
{
console
.
info
(
`
${
TagFrmwk
}
: Callback: getDevices INPUT_DEVICES_FLAG`
);
value
.
forEach
(
displayDeviceProp
);
if
(
deviceTypeValue
!=
null
&&
deviceRoleValue
!=
null
)
{
console
.
info
(
`
${
TagFrmwk
}
: Callback: getDevices : INPUT_DEVICES_FLAG: PASS`
);
expect
(
true
).
assertTrue
();
}
else
{
console
.
info
(
`
${
TagFrmwk
}
: Callback: getDevices : INPUT_DEVICES_FLAG: FAIL`
);
expect
(
false
).
assertTrue
();
}
}
done
();
});
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_CB_GETDEVICES_ALL_0100
*@tc.name : getDevices - ALL device - Callback - ENAME
*@tc.desc : getDevices - ALL device
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 0
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_MANAGER_CB_GETDEVICES_ALL_0100
'
,
0
,
function
(
done
)
{
audioManager
.
getDevices
(
audio
.
DeviceFlag
.
ALL_DEVICES_FLAG
,
(
err
,
value
)
=>
{
console
.
info
(
`
${
TagFrmwk
}
: Callback: getDevices ALL_DEVICES_FLAG`
);
if
(
err
)
{
console
.
error
(
`
${
TagFrmwk
}
: Callback: ALL_DEVICES_FLAG: failed to get devices
${
err
.
message
}
`
);
expect
().
assertFail
();
}
else
{
console
.
info
(
`
${
TagFrmwk
}
: Callback: getDevices ALL_DEVICES_FLAG`
);
value
.
forEach
(
displayDeviceProp
);
if
(
deviceTypeValue
!=
null
&&
deviceRoleValue
!=
null
)
{
console
.
info
(
`
${
TagFrmwk
}
: Callback: getDevices : ALL_DEVICES_FLAG: PASS`
);
expect
(
true
).
assertTrue
();
}
else
{
console
.
info
(
`
${
TagFrmwk
}
: Callback: getDevices : ALL_DEVICES_FLAG: FAIL`
);
expect
(
false
).
assertTrue
();
}
}
done
();
});
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_CB_GETDEVICES_ALL_ENUM_0100
*@tc.name : getDevices - ALL device - Callback - ENUM
*@tc.desc : getDevices - ALL device
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_MANAGER_CB_GETDEVICES_ALL_ENUM_0100
'
,
2
,
function
(
done
)
{
audioManager
.
getDevices
(
3
,
(
err
,
value
)
=>
{
console
.
info
(
`
${
TagFrmwk
}
: Callback: getDevices ALL_DEVICES_FLAG`
);
if
(
err
)
{
console
.
error
(
`
${
TagFrmwk
}
: Callback: ALL_DEVICES_FLAG: failed to get devices
${
err
.
message
}
`
);
expect
().
assertFail
();
}
else
{
console
.
info
(
`
${
TagFrmwk
}
: Callback: getDevices ALL_DEVICES_FLAG`
);
value
.
forEach
(
displayDeviceProp
);
if
(
deviceTypeValue
!=
null
&&
deviceRoleValue
!=
null
)
{
console
.
info
(
`
${
TagFrmwk
}
: Callback: getDevices : ALL_DEVICES_FLAG: PASS`
);
expect
(
true
).
assertTrue
();
}
else
{
console
.
info
(
`
${
TagFrmwk
}
: Callback: getDevices : ALL_DEVICES_FLAG: FAIL`
);
expect
(
false
).
assertTrue
();
}
}
done
();
});
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_MANAGER_DEVICECHANGETYPE_0100
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录