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

fix code build err

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