From 95934867cf780f4b1125d5fa9a9cca0229d11684 Mon Sep 17 00:00:00 2001 From: hu0475 Date: Tue, 18 Jul 2023 19:34:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9distributeddatamgr=E5=AD=90?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F[preferences]=E6=A8=A1=E5=9D=97=E7=9A=84?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hu0475 --- .../src/main/ets/test/PreferencesHelper.test.ets | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/distributeddatamgr/crossplatform/preferencesetstest/src/main/ets/test/PreferencesHelper.test.ets b/distributeddatamgr/crossplatform/preferencesetstest/src/main/ets/test/PreferencesHelper.test.ets index 5f74af00f..324f18a08 100644 --- a/distributeddatamgr/crossplatform/preferencesetstest/src/main/ets/test/PreferencesHelper.test.ets +++ b/distributeddatamgr/crossplatform/preferencesetstest/src/main/ets/test/PreferencesHelper.test.ets @@ -255,7 +255,7 @@ export default function preferencesHelperTest() { mPreferences.on("change"); } catch (err) { console.info("Failed to testPreferencesOn002. code =" + err.code + ", message =" + err.message); - expect(err.code === "401" && err.message === "Parameter error. Need 2 parameters!").assertTrue(); + expect(err.code === "401").assertTrue(); } }); @@ -277,7 +277,7 @@ export default function preferencesHelperTest() { mPreferences.on(null, observer); } catch (err) { console.info("Failed to testPreferencesOn003. code =" + err.code + ", message =" + err.message); - expect(err.code === "401" && err.message === "Parameter error. The type of 'type' must be string 'change'.").assertTrue(); + expect(err.code === "401").assertTrue(); } }); @@ -299,7 +299,7 @@ export default function preferencesHelperTest() { mPreferences.on("", observer); } catch (err) { console.info("Failed to testPreferencesOn004. code =" + err.code + ", message =" + err.message); - expect(err.code === "401" && err.message === "Parameter error. The type of 'type' must be string 'change'.").assertTrue(); + expect(err.code === "401").assertTrue(); } }); @@ -379,7 +379,7 @@ export default function preferencesHelperTest() { mPreferences.off(null); } catch (err) { console.info("Failed to testPreferencesOff003. code =" + err.code + ", message =" + err.message); - expect(err.code === "401" && err.message === "Parameter error. The type of 'type' must be string 'change'.").assertTrue(); + expect(err.code === "401").assertTrue(); } }); @@ -403,7 +403,7 @@ export default function preferencesHelperTest() { mPreferences.off(""); } catch (err) { console.info("Failed to testPreferencesOff004. code =" + err.code + ", message =" + err.message); - expect(err.code === "401" && err.message === "Parameter error. The type of 'type' must be string 'change'.").assertTrue(); + expect(err.code === "401").assertTrue(); } }); }); -- GitLab