Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
d1c261ed
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
d1c261ed
编写于
8月 24, 2023
作者:
L
lixinyi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
xts_acts-crossplatform
Signed-off-by:
N
lixinyi
<
lixinyi38@huawei.com
>
上级
cef5d3ad
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
28 addition
and
28 deletion
+28
-28
distributeddatamgr/crossplatform/preferencesetstest/src/main/ets/test/PreferencesCallBackWithError.test.ets
...t/src/main/ets/test/PreferencesCallBackWithError.test.ets
+7
-7
distributeddatamgr/crossplatform/preferencesetstest/src/main/ets/test/PreferencesIgnore.test.ets
...encesetstest/src/main/ets/test/PreferencesIgnore.test.ets
+9
-9
distributeddatamgr/crossplatform/preferencesetstest/src/main/ets/test/PreferencesPromiseWithError.test.ets
...st/src/main/ets/test/PreferencesPromiseWithError.test.ets
+12
-12
未找到文件。
distributeddatamgr/crossplatform/preferencesetstest/src/main/ets/test/PreferencesCallBackWithError.test.ets
浏览文件 @
d1c261ed
...
@@ -98,7 +98,7 @@ export default function preferencesCallbackWithErrorTest() {
...
@@ -98,7 +98,7 @@ export default function preferencesCallbackWithErrorTest() {
});
});
} catch (err) {
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401"
&& err.message === "Parameter error. Need 2 or 3 parameters!"
).assertTrue();
expect(err.code === "401").assertTrue();
done();
done();
console.log("testMpreferencesGet0000 end.");
console.log("testMpreferencesGet0000 end.");
}
}
...
@@ -126,7 +126,7 @@ export default function preferencesCallbackWithErrorTest() {
...
@@ -126,7 +126,7 @@ export default function preferencesCallbackWithErrorTest() {
});
});
} catch (err) {
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401"
&& err.message === "Parameter error. The type of 'value' must be string."
).assertTrue();
expect(err.code === "401").assertTrue();
done();
done();
}
}
});
});
...
@@ -203,7 +203,7 @@ export default function preferencesCallbackWithErrorTest() {
...
@@ -203,7 +203,7 @@ export default function preferencesCallbackWithErrorTest() {
});
});
} catch (err) {
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401"
&& err.message === "Parameter error. The type of 'value' must be string."
).assertTrue();
expect(err.code === "401").assertTrue();
done();
done();
console.log("testMpreferencesHas0001 end.");
console.log("testMpreferencesHas0001 end.");
}
}
...
@@ -252,7 +252,7 @@ export default function preferencesCallbackWithErrorTest() {
...
@@ -252,7 +252,7 @@ export default function preferencesCallbackWithErrorTest() {
});
});
} catch (err) {
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401"
&& err.message === "Parameter error. Need 2 or 3 parameters!"
).assertTrue();
expect(err.code === "401").assertTrue();
done();
done();
console.log("testMpreferencesPut0001 end.");
console.log("testMpreferencesPut0001 end.");
}
}
...
@@ -339,7 +339,7 @@ export default function preferencesCallbackWithErrorTest() {
...
@@ -339,7 +339,7 @@ export default function preferencesCallbackWithErrorTest() {
});
});
} catch (err) {
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401"
&& err.message === "Parameter error. The type of 'value' must be string."
).assertTrue();
expect(err.code === "401").assertTrue();
done();
done();
}
}
});
});
...
@@ -367,7 +367,7 @@ export default function preferencesCallbackWithErrorTest() {
...
@@ -367,7 +367,7 @@ export default function preferencesCallbackWithErrorTest() {
});
});
} catch (err) {
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401"
&& err.message === "Parameter error. The type of 'value' must be ValueType."
).assertTrue();
expect(err.code === "401").assertTrue();
done();
done();
}
}
});
});
...
@@ -389,7 +389,7 @@ export default function preferencesCallbackWithErrorTest() {
...
@@ -389,7 +389,7 @@ export default function preferencesCallbackWithErrorTest() {
});
});
} catch (err) {
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401"
&& err.message === "Parameter error. The type of 'value' must be string."
).assertTrue();
expect(err.code === "401").assertTrue();
done();
done();
console.log("testMpreferencesDelete0001 end.");
console.log("testMpreferencesDelete0001 end.");
}
}
...
...
distributeddatamgr/crossplatform/preferencesetstest/src/main/ets/test/PreferencesIgnore.test.ets
浏览文件 @
d1c261ed
...
@@ -58,7 +58,7 @@ export default function preferencesIgnoreTest() {
...
@@ -58,7 +58,7 @@ export default function preferencesIgnoreTest() {
});
});
} catch (err) {
} catch (err) {
console.info("testPreferencesGetPreferences001 fail: " + err.message + "code: " + err.code);
console.info("testPreferencesGetPreferences001 fail: " + err.message + "code: " + err.code);
expect(err.code === "401"
&& err.message == "Parameter error. The type of 'name' must be a without path non empty string."
).assertTrue();
expect(err.code === "401").assertTrue();
done();
done();
}
}
});
});
...
@@ -90,7 +90,7 @@ export default function preferencesIgnoreTest() {
...
@@ -90,7 +90,7 @@ export default function preferencesIgnoreTest() {
});
});
} catch (err) {
} catch (err) {
console.info("testPreferencesDeletePreferences002 fail: " + err.message + "code: " + err.code);
console.info("testPreferencesDeletePreferences002 fail: " + err.message + "code: " + err.code);
expect(err.code === "401"
&& err.message === "Parameter error. The type of 'name' must be a without path non empty string."
).assertTrue();
expect(err.code === "401").assertTrue();
done();
done();
}
}
}
}
...
@@ -124,7 +124,7 @@ export default function preferencesIgnoreTest() {
...
@@ -124,7 +124,7 @@ export default function preferencesIgnoreTest() {
});
});
} catch (err) {
} catch (err) {
console.info("testRemovePreferencesFromCache002 fail: " + err.message + "code: " + err.code);
console.info("testRemovePreferencesFromCache002 fail: " + err.message + "code: " + err.code);
expect(err.code === "401"
&& err.message === "Parameter error. The type of 'name' must be a without path non empty string."
).assertTrue();
expect(err.code === "401").assertTrue();
done();
done();
}
}
}
}
...
@@ -145,7 +145,7 @@ export default function preferencesIgnoreTest() {
...
@@ -145,7 +145,7 @@ export default function preferencesIgnoreTest() {
await dataPreferences.getPreferences(context, -1);
await dataPreferences.getPreferences(context, -1);
} catch (err) {
} catch (err) {
console.info("testGetPreferencesHelper0003 fail: " + err.message + "code: " + err.code);
console.info("testGetPreferencesHelper0003 fail: " + err.message + "code: " + err.code);
expect(err.code === "401"
&& err.message === "Parameter error. The type of 'name' must be a without path non empty string."
).assertTrue();
expect(err.code === "401").assertTrue();
done();
done();
}
}
});
});
...
@@ -164,7 +164,7 @@ export default function preferencesIgnoreTest() {
...
@@ -164,7 +164,7 @@ export default function preferencesIgnoreTest() {
await dataPreferences.getPreferences(context);
await dataPreferences.getPreferences(context);
} catch (err) {
} catch (err) {
console.info("testGetPreferencesHelper0004 fail: " + err.message + "code: " + err.code);
console.info("testGetPreferencesHelper0004 fail: " + err.message + "code: " + err.code);
expect(err.code === "401"
&& err.message === "Parameter error. Need 2 or 3 parameters!"
).assertTrue();
expect(err.code === "401").assertTrue();
done();
done();
}
}
});
});
...
@@ -184,7 +184,7 @@ export default function preferencesIgnoreTest() {
...
@@ -184,7 +184,7 @@ export default function preferencesIgnoreTest() {
await dataPreferences.removePreferencesFromCache(context);
await dataPreferences.removePreferencesFromCache(context);
} catch (err) {
} catch (err) {
console.info("testRemovePreferencesFromCacheHelper0002 fail: " + err.message + "code: " + err.code);
console.info("testRemovePreferencesFromCacheHelper0002 fail: " + err.message + "code: " + err.code);
expect(err.code === "401"
&& err.message === "Parameter error. Need 2 or 3 parameters!"
).assertTrue();
expect(err.code === "401").assertTrue();
done();
done();
}
}
});
});
...
@@ -204,7 +204,7 @@ export default function preferencesIgnoreTest() {
...
@@ -204,7 +204,7 @@ export default function preferencesIgnoreTest() {
await dataPreferences.removePreferencesFromCache(context, -1);
await dataPreferences.removePreferencesFromCache(context, -1);
} catch (err) {
} catch (err) {
console.info("testRemovePreferencesFromCacheHelper0003 fail: " + err.message + "code: " + err.code);
console.info("testRemovePreferencesFromCacheHelper0003 fail: " + err.message + "code: " + err.code);
expect(err.code === "401"
&& err.message === "Parameter error. The type of 'name' must be a without path non empty string."
).assertTrue();
expect(err.code === "401").assertTrue();
done();
done();
}
}
});
});
...
@@ -224,7 +224,7 @@ export default function preferencesIgnoreTest() {
...
@@ -224,7 +224,7 @@ export default function preferencesIgnoreTest() {
await dataPreferences.deletePreferences(context);
await dataPreferences.deletePreferences(context);
} catch (err) {
} catch (err) {
console.info("testPreferencesDeleteHelper0002 fail: " + err.message + "code: " + err.code);
console.info("testPreferencesDeleteHelper0002 fail: " + err.message + "code: " + err.code);
expect(err.code === "401"
&& err.message === "Parameter error. Need 2 or 3 parameters!"
).assertTrue();
expect(err.code === "401").assertTrue();
done();
done();
}
}
});
});
...
@@ -244,7 +244,7 @@ export default function preferencesIgnoreTest() {
...
@@ -244,7 +244,7 @@ export default function preferencesIgnoreTest() {
await dataPreferences.deletePreferences(context, -1);
await dataPreferences.deletePreferences(context, -1);
} catch (err) {
} catch (err) {
console.info("testPreferencesDeleteHelper0003 fail: " + err.message + "code: " + err.code);
console.info("testPreferencesDeleteHelper0003 fail: " + err.message + "code: " + err.code);
expect(err.code === "401"
&& err.message === "Parameter error. The type of 'name' must be a without path non empty string."
).assertTrue();
expect(err.code === "401").assertTrue();
done();
done();
}
}
});
});
...
...
distributeddatamgr/crossplatform/preferencesetstest/src/main/ets/test/PreferencesPromiseWithError.test.ets
浏览文件 @
d1c261ed
...
@@ -127,7 +127,7 @@ export default function preferencesPromiseWithErrorTest() {
...
@@ -127,7 +127,7 @@ export default function preferencesPromiseWithErrorTest() {
});
});
} catch (err) {
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401"
&& err.message === "Parameter error. Need 2 or 3 parameters!"
).assertTrue();
expect(err.code === "401").assertTrue();
done();
done();
console.log("testMpreferencesGetPromise0001 end.");
console.log("testMpreferencesGetPromise0001 end.");
}
}
...
@@ -157,7 +157,7 @@ export default function preferencesPromiseWithErrorTest() {
...
@@ -157,7 +157,7 @@ export default function preferencesPromiseWithErrorTest() {
});
});
} catch (err) {
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401"
&& err.message === "Parameter error. The type of 'value' must be string."
).assertTrue();
expect(err.code === "401").assertTrue();
done();
done();
}
}
});
});
...
@@ -205,7 +205,7 @@ export default function preferencesPromiseWithErrorTest() {
...
@@ -205,7 +205,7 @@ export default function preferencesPromiseWithErrorTest() {
mPreference.getSync(1233);
mPreference.getSync(1233);
} catch (err) {
} catch (err) {
console.log("trycatch1 err =" + err + ", code =" + err.code + ", message =" + err.message);
console.log("trycatch1 err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401"
&& err.message === "Parameter error. Need 2 parameters!"
).assertTrue();
expect(err.code === "401").assertTrue();
done();
done();
console.log("testMpreferencesGetSyncWithError0001 end.");
console.log("testMpreferencesGetSyncWithError0001 end.");
}
}
...
@@ -226,7 +226,7 @@ export default function preferencesPromiseWithErrorTest() {
...
@@ -226,7 +226,7 @@ export default function preferencesPromiseWithErrorTest() {
mPreference.getSync(-1, KEY_TEST_INT_ELEMENT);
mPreference.getSync(-1, KEY_TEST_INT_ELEMENT);
} catch (err) {
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401"
&& err.message === "Parameter error. The type of 'value' must be string."
).assertTrue();
expect(err.code === "401").assertTrue();
done();
done();
}
}
});
});
...
@@ -303,7 +303,7 @@ export default function preferencesPromiseWithErrorTest() {
...
@@ -303,7 +303,7 @@ export default function preferencesPromiseWithErrorTest() {
});
});
} catch (err) {
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401"
&& err.message === "Parameter error. The type of 'value' must be string."
).assertTrue();
expect(err.code === "401").assertTrue();
done();
done();
console.log("testMpreferencesHasPromise0001 end.");
console.log("testMpreferencesHasPromise0001 end.");
}
}
...
@@ -358,7 +358,7 @@ export default function preferencesPromiseWithErrorTest() {
...
@@ -358,7 +358,7 @@ export default function preferencesPromiseWithErrorTest() {
});
});
} catch (err) {
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401"
&& err.message === "Parameter error. Need 2 or 3 parameters!"
).assertTrue();
expect(err.code === "401").assertTrue();
done();
done();
console.log("testMpreferencesPutPromise0001 end.");
console.log("testMpreferencesPutPromise0001 end.");
}
}
...
@@ -451,7 +451,7 @@ export default function preferencesPromiseWithErrorTest() {
...
@@ -451,7 +451,7 @@ export default function preferencesPromiseWithErrorTest() {
});
});
} catch (err) {
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401"
&& err.message === "Parameter error. The type of 'value' must be string."
).assertTrue();
expect(err.code === "401").assertTrue();
done();
done();
}
}
});
});
...
@@ -480,7 +480,7 @@ export default function preferencesPromiseWithErrorTest() {
...
@@ -480,7 +480,7 @@ export default function preferencesPromiseWithErrorTest() {
});
});
} catch (err) {
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401"
&& err.message === "Parameter error. The type of 'value' must be ValueType."
).assertTrue();
expect(err.code === "401").assertTrue();
done();
done();
}
}
});
});
...
@@ -499,7 +499,7 @@ export default function preferencesPromiseWithErrorTest() {
...
@@ -499,7 +499,7 @@ export default function preferencesPromiseWithErrorTest() {
mPreference.putSync(1233);
mPreference.putSync(1233);
} catch (err) {
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401"
&& err.message === "Parameter error. Need 2 parameters!"
).assertTrue();
expect(err.code === "401").assertTrue();
done();
done();
console.log("testMpreferencesPutSyncWithError0001 end.");
console.log("testMpreferencesPutSyncWithError0001 end.");
}
}
...
@@ -565,7 +565,7 @@ export default function preferencesPromiseWithErrorTest() {
...
@@ -565,7 +565,7 @@ export default function preferencesPromiseWithErrorTest() {
mPreference.putSync(-1, 123);
mPreference.putSync(-1, 123);
} catch (err) {
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401"
&& err.message === "Parameter error. The type of 'value' must be string."
).assertTrue();
expect(err.code === "401").assertTrue();
done();
done();
}
}
});
});
...
@@ -584,7 +584,7 @@ export default function preferencesPromiseWithErrorTest() {
...
@@ -584,7 +584,7 @@ export default function preferencesPromiseWithErrorTest() {
mPreference.putSync(KEY_TEST_STRING_ELEMENT, null);
mPreference.putSync(KEY_TEST_STRING_ELEMENT, null);
} catch (err) {
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401"
&& err.message === "Parameter error. The type of 'value' must be ValueType."
).assertTrue();
expect(err.code === "401").assertTrue();
done();
done();
}
}
});
});
...
@@ -611,7 +611,7 @@ export default function preferencesPromiseWithErrorTest() {
...
@@ -611,7 +611,7 @@ export default function preferencesPromiseWithErrorTest() {
});
});
} catch (err) {
} catch (err) {
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
console.log("trycatch err =" + err + ", code =" + err.code + ", message =" + err.message);
expect(err.code === "401"
&& err.message === "Parameter error. The type of 'value' must be string."
).assertTrue();
expect(err.code === "401").assertTrue();
done();
done();
console.log("testMpreferencesDeletePromise0001 end.");
console.log("testMpreferencesDeletePromise0001 end.");
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录