提交 980f9f43 编写于 作者: W wangzx0705

fix code build err

Signed-off-by: Nwangzx0705 <wangzx0705@thundersoft.com>
上级 390f499f
......@@ -373,14 +373,14 @@ export default function audioManagerTest() {
try {
await audioVolumeGroupManager.getSystemVolumeInDb(audio.AudioVolumeType.MEDIA, '123', audio.DeviceType.SPEAKER)
.then((data) => {
console.info(`####getSystemVolumeInDb :SUCCESS ${data}`);
console.info(`getSystemVolumeInDb :SUCCESS ${data}`);
expect(false).assertTrue();
done();
})
.catch((error) => {
if (error.code == env.INVALID_INPUT_PARAMETER_6800101) {
console.log(`${TagFrmwk}: ####getSystemVolumeInDb : error ${error.message} ${error.code}`);
expect(true).assertTrue();
if (error) {
console.log(`${TagFrmwk}:getSystemVolumeInDb error: ${error.message} ${error.code}`);
expect(Number(error.code)).assertEqual(env.INVALID_INPUT_PARAMETER_6800101);
done();
} else {
expect(false).assertTrue();
......@@ -388,7 +388,7 @@ export default function audioManagerTest() {
}
});
} catch (error) {
console.info(`SUB_MULTIMEDIA_AUDIO_VOLUME_GROUP_MANAGER_GETSYSTEMVOLUMEINDB_PROMISE_1000: error ${error.message}, code ${error.code}`);
console.info(`GETSYSTEMVOLUMEINDB error ${error.message}, code ${error.code}`);
expect(false).assertTrue();
done();
}
......
......@@ -311,20 +311,19 @@ export default function audioRendererTest() {
let samplingrate = 0;
try{
await audioRen.setRendererSamplingRate(samplingrate);
console.info(`${TagFrmwkRender}: ####setRendererSamplingRate: success`);
}catch(error) {
if (error.code == env.UNSUPORTED_OPTION_6800104){
console.log(`${TagFrmwkRender}: ####setRendererSamplingRate: catch error: [${error.code}, ${error.message}]`);
console.log(`${TagFrmwkRender}: setRendererSamplingRate: catch error: [${error.code}, ${error.message}]`);
try{
await audioRen.getRendererSamplingRate().then((data) => {
console.info(`${TagFrmwkRender}: getRendererSamplingRate :SUCCESS ${data}`);
expect(data).assertEqual(env.SAMPLING_RATE_44100);
}).catch ((error)=>{
console.log("${TagFrmwkRender}: #####getRendererSamplingRate : error = " + error);
console.log("${TagFrmwkRender}: getRendererSamplingRate : error = " + error);
expect(false).assertTrue();
});
}catch(error){
console.log("####setRendererSamplingRate: catch error = " + error);
console.log("setRendererSamplingRate: catch error = " + error);
}
done();
} else {
......
......@@ -224,7 +224,7 @@ export default function audioRendererTest() {
} catch (error) {
if (error) {
console.log(`${TagFrmwkRender}: Off catch error, error: [${error.code}, ${error.message}]`);
expect(Number(error.code)).assertEqual(UNSUPORTED_OPTION_6800104);
expect(Number(error.code)).assertEqual(env.UNSUPORTED_OPTION_6800104);
done();
} else {
expect(false).assertTrue();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册