提交 c301847b 编写于 作者: A anning

设置用例补充

Signed-off-by: Nanning <anning7@huawei.com>
上级 d43235bc
...@@ -70,13 +70,13 @@ export default function settingUiJsunit() { ...@@ -70,13 +70,13 @@ export default function settingUiJsunit() {
done(); done();
}); });
it('settings_get_value_006', 0, async function () { it('settings_get_value_006', 0, async function (done) {
var name = 'settings.screen.brightness2'; var name = 'settings.screen.brightness2';
var uri = settings.getUriSync(name); var uri = settings.getUriSync(name);
console.info("[settings_get_value_006] uri is: " + uri); console.info("[settings_get_value_006] uri is: " + uri);
var helper = featureAbility.acquireDataAbilityHelper(uri); var helper = featureAbility.acquireDataAbilityHelper(uri);
let obj = { let obj = {
"aa": aa aa: "aa"
} }
try { try {
let value = settings.getValueSync(helper, name, obj); let value = settings.getValueSync(helper, name, obj);
...@@ -84,13 +84,13 @@ export default function settingUiJsunit() { ...@@ -84,13 +84,13 @@ export default function settingUiJsunit() {
expect(value).assertEqual("test getValueSync"); expect(value).assertEqual("test getValueSync");
} catch (err) { } catch (err) {
console.error("[settings_get_value_006] error = " + err); console.error("[settings_get_value_006] error = " + err);
expect(err == "Error: assertion (valueType == napi_string) failed: Wrong argument type. String expected.") expect(err == "Error: assertion (valueType == napi_string) failed: Wrong argument[2] type. String expected.")
.assertTrue(); .assertTrue();
} }
done(); done();
}); });
it('settings_get_value_007', 0, async function () { it('settings_get_value_007', 0, async function (done) {
var name = 'settings.screen.brightness3'; var name = 'settings.screen.brightness3';
var uri = settings.getUriSync(name); var uri = settings.getUriSync(name);
console.info("[settings_get_value_007] uri is: " + uri); console.info("[settings_get_value_007] uri is: " + uri);
...@@ -261,7 +261,7 @@ export default function settingUiJsunit() { ...@@ -261,7 +261,7 @@ export default function settingUiJsunit() {
done(); done();
}); });
it('settings_get_value_0016', 0, async function () { it('settings_get_value_0016', 0, async function (done) {
let name = 1332; let name = 1332;
try { try {
var uri = settings.getUriSync(name); var uri = settings.getUriSync(name);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册