提交 a9678eee 编写于 作者: A anning

applications

Signed-off-by: Nanning <anning7@huawei.com>
上级 ee917be2
# Copyright (C) 2021 Huawei Device Co., Ltd.
# Copyright (C) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
......
# Copyright (C) 2021 Huawei Device Co., Ltd.
# Copyright (C) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
......
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Copyright (c) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
......
......@@ -1183,5 +1183,75 @@ export default function settingUiJsunit() {
return;
}
});
it('settings_get_value_113',0,async function(done){
try{console.info('test settings_get_value_113 start');
settings.enableAirplaneMode(false,(err,data)=>{console.info('settings test enableAirplaneMode callback ssss');
console.info('settings test enableAirplaneMode callback err'+JSON.stringify(err.code));
expect(JSON.stringify(err.code)).assertEqual("801");
done();
})
}catch(err){console.info('settings test enableAirplaneMode try catch err');
expect(true).assertTrue();
done();
return;
}
});
it('settings_get_value_114',0,async function(done){
try{
settings.enableAirplaneMode(false).then((data)=>{
console.info('settings test enableAirplaneMode promise data'+JSON.stringify(data));
expect(false).assertTrue();
done();
}).catch((err)=>{
console.info('settings test enableAirplaneMode promise err'+JSON.stringify(err.code));
expect(JSON.stringify(err.code)).assertEqual("801");
done();
return;
})
}catch(err){
console.info('settings test enableAirplaneMode try catch err'+JSON.stringify(err));
expect(true).assertTrue();
done();
return;
}
});
it('settings_get_value_115',0,async function (done) {
try{
settings.canShowFloating((err,data)=>{
console.info('settings test canShowFloating promise err'+JSON.stringify(err.code));
expect(JSON.stringify(err.code)).assertEqual("801");
done();
})
}catch(err){
console.info('settings test canShowFloating promise err'+toString(err));
expect(true).assertTrue();
done();
return;
}
});
it('settings_get_value_116',0,async function (done) {
try{
let str = {"code":801};
settings.canShowFloating().then((data)=>{
console.info('settings test canShowFloating promise err'+toString(data));
expect(toString(err)).assertEqual(str);
done();
}).catch((err)=>{
console.info('settings test canShowFloating promise err'+JSON.stringify(err.code));
expect(JSON.stringify(err.code)).assertEqual("801");
done();
return;
})
}catch(err){
console.info('settings test canShowFloating promise err'+toString(err));
expect(true).assertTrue();
done();
return;
}
});
})
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册