提交 95934867 编写于 作者: H hu0475

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

Signed-off-by: Nhu0475 <huyanqiang5@huawei.com>
上级 f1b8c2b4
......@@ -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.
先完成此消息的编辑!
想要评论请 注册