diff --git a/applications/BUILD.gn b/applications/BUILD.gn index 7c8653c03476f9e4785d0c96735fe17011ed9f8e..c11d1209e10c48b5e9af49f49abf844158b6865a 100644 --- a/applications/BUILD.gn +++ b/applications/BUILD.gn @@ -1,4 +1,4 @@ -# 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 diff --git a/applications/settingsdata/BUILD.gn b/applications/settingsdata/BUILD.gn index 8c1858d8f006f03d18153b39ea64193bc6dadffa..dd277e22ba19016fa144657b6d83270cd6165690 100644 --- a/applications/settingsdata/BUILD.gn +++ b/applications/settingsdata/BUILD.gn @@ -1,4 +1,4 @@ -# 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 diff --git a/applications/settingsdata/settings_ets/BUILD.gn b/applications/settingsdata/settings_ets/BUILD.gn index c32edc59897b7047d5a2ad5d1f54628fc1c23ad7..7a002f2bc1df61adf8b0e14856126642b7b4d659 100644 --- a/applications/settingsdata/settings_ets/BUILD.gn +++ b/applications/settingsdata/settings_ets/BUILD.gn @@ -1,4 +1,4 @@ -# 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 diff --git a/applications/settingsdata/settings_ets/entry/src/main/ets/test/SettingUiJsunit.test.ets b/applications/settingsdata/settings_ets/entry/src/main/ets/test/SettingUiJsunit.test.ets index 91bda97357baad7e3648e2bd5c111f6877d0670c..53b7fa20955a5c544339ca4e858e771b172e7b7d 100644 --- a/applications/settingsdata/settings_ets/entry/src/main/ets/test/SettingUiJsunit.test.ets +++ b/applications/settingsdata/settings_ets/entry/src/main/ets/test/SettingUiJsunit.test.ets @@ -1183,5 +1183,74 @@ 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; + } + }); }) }