未验证 提交 d3ffa422 编写于 作者: O openharmony_ci 提交者: Gitee

!9566 修改distributeddatamgr子系统[preferences]模块的代码

Merge pull request !9566 from huyanqiang/Branch_distributeddatamgr_lifangyuan
......@@ -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();
}
});
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册