Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
6b3724e5
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看板
提交
6b3724e5
编写于
11月 30, 2021
作者:
Z
zhaiyanni
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
<zhangmaowen@huawei.com>
Signed-off-by:
N
zhaiyanni
<
zhaiyanni@huawei.com
>
上级
caefa1c6
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
129 addition
and
134 deletion
+129
-134
distributeddatamgr/appdatamgrjstest/hap/src/main/js/default/test/RdbstorePredicatesJsunit.test.js
...src/main/js/default/test/RdbstorePredicatesJsunit.test.js
+108
-111
distributeddatamgr/appdatamgrjstest/hap/src/main/js/default/test/StorageCallBackJsunit.test.js
...ap/src/main/js/default/test/StorageCallBackJsunit.test.js
+21
-23
未找到文件。
distributeddatamgr/appdatamgrjstest/hap/src/main/js/default/test/RdbstorePredicatesJsunit.test.js
浏览文件 @
6b3724e5
此差异已折叠。
点击以展开。
distributeddatamgr/appdatamgrjstest/hap/src/main/js/default/test/StorageCallBackJsunit.test.js
100755 → 100644
浏览文件 @
6b3724e5
...
...
@@ -44,8 +44,8 @@ describe('storageTest', function () {
mPref
.
flushSync
();
await
mPref
.
clear
(
function
(
err
,
ret
)
{
expect
(
"
defaultvalue
"
).
assertEqual
(
mPref
.
getSync
(
KEY_TEST_STRING_ELEMENT
,
"
defaultvalue
"
));
done
();
});
done
();
})
/**
...
...
@@ -57,8 +57,8 @@ describe('storageTest', function () {
mPref
.
putSync
(
KEY_TEST_STRING_ELEMENT
,
"
test
"
);
await
mPref
.
has
(
KEY_TEST_STRING_ELEMENT
,
function
(
err
,
ret
)
{
expect
(
true
).
assertEqual
(
ret
);
done
();
})
done
();
})
/**
...
...
@@ -70,8 +70,8 @@ describe('storageTest', function () {
mPref
.
putSync
(
KEY_TEST_INT_ELEMENT
,
1
);
await
mPref
.
has
(
KEY_TEST_INT_ELEMENT
,
function
(
err
,
ret
)
{
expect
(
true
).
assertEqual
(
ret
);
done
();
})
done
();
})
/**
...
...
@@ -83,8 +83,8 @@ describe('storageTest', function () {
mPref
.
putSync
(
KEY_TEST_FLOAT_ELEMENT
,
1.1
);
await
mPref
.
has
(
KEY_TEST_FLOAT_ELEMENT
,
function
(
err
,
ret
)
{
expect
(
true
).
assertEqual
(
ret
);
done
();
})
done
();
})
/**
...
...
@@ -96,8 +96,8 @@ describe('storageTest', function () {
mPref
.
putSync
(
KEY_TEST_LONG_ELEMENT
,
0
);
await
mPref
.
has
(
KEY_TEST_LONG_ELEMENT
,
function
(
err
,
ret
)
{
expect
(
true
).
assertEqual
(
ret
);
done
();
})
done
();
})
/**
...
...
@@ -109,8 +109,8 @@ describe('storageTest', function () {
mPref
.
putSync
(
KEY_TEST_BOOLEAN_ELEMENT
,
false
);
await
mPref
.
has
(
KEY_TEST_BOOLEAN_ELEMENT
,
function
(
err
,
ret
)
{
expect
(
true
).
assertEqual
(
ret
);
done
();
})
done
();
})
/**
...
...
@@ -122,8 +122,8 @@ describe('storageTest', function () {
mPref
.
clearSync
();
await
mPref
.
get
(
KEY_TEST_STRING_ELEMENT
,
"
defaultValue
"
,
function
(
err
,
ret
)
{
expect
(
'
defaultValue
'
).
assertEqual
(
ret
);
done
();
})
done
();
})
/**
...
...
@@ -136,8 +136,8 @@ describe('storageTest', function () {
mPref
.
putSync
(
KEY_TEST_FLOAT_ELEMENT
,
3.0
);
await
mPref
.
get
(
KEY_TEST_FLOAT_ELEMENT
,
0.0
,
function
(
err
,
ret
)
{
expect
(
3.0
).
assertEqual
(
ret
);
done
();
})
done
();
})
/**
...
...
@@ -150,8 +150,8 @@ describe('storageTest', function () {
mPref
.
putSync
(
KEY_TEST_INT_ELEMENT
,
3
);
await
mPref
.
get
(
KEY_TEST_INT_ELEMENT
,
0.0
,
function
(
err
,
ret
)
{
expect
(
3
).
assertEqual
(
ret
);
done
();
})
done
();
})
/**
...
...
@@ -165,8 +165,8 @@ describe('storageTest', function () {
expect
(
3
).
assertEqual
(
mPref
.
getSync
(
KEY_TEST_LONG_ELEMENT
,
0
));
await
mPref
.
get
(
KEY_TEST_LONG_ELEMENT
,
0
,
function
(
err
,
ret
)
{
expect
(
3
).
assertEqual
(
ret
);
done
();
});
done
();
})
/**
...
...
@@ -180,8 +180,8 @@ describe('storageTest', function () {
mPref
.
flushSync
();
await
mPref
.
get
(
KEY_TEST_STRING_ELEMENT
,
"
defaultvalue
"
,
function
(
err
,
ret
)
{
expect
(
'
test
'
).
assertEqual
(
ret
);
done
();
});
done
();
})
/**
...
...
@@ -195,8 +195,8 @@ describe('storageTest', function () {
expect
(
true
).
assertEqual
(
mPref
.
getSync
(
KEY_TEST_BOOLEAN_ELEMENT
,
false
));
mPref
.
flushSync
();
expect
(
true
).
assertEqual
(
mPref
.
getSync
(
KEY_TEST_BOOLEAN_ELEMENT
,
false
));
done
();
});
done
();
})
/**
...
...
@@ -210,8 +210,8 @@ describe('storageTest', function () {
expect
(
4.0
).
assertEqual
(
mPref
.
getSync
(
KEY_TEST_FLOAT_ELEMENT
,
0.0
));
mPref
.
flushSync
();
expect
(
4.0
).
assertEqual
(
mPref
.
getSync
(
KEY_TEST_FLOAT_ELEMENT
,
0.0
));
done
();
});
done
();
})
/**
...
...
@@ -225,8 +225,8 @@ describe('storageTest', function () {
expect
(
4
).
assertEqual
(
mPref
.
getSync
(
KEY_TEST_INT_ELEMENT
,
0
));
mPref
.
flushSync
();
expect
(
4
).
assertEqual
(
mPref
.
getSync
(
KEY_TEST_INT_ELEMENT
,
0
));
done
();
});
done
();
})
/**
...
...
@@ -241,8 +241,8 @@ describe('storageTest', function () {
expect
(
4
).
assertEqual
(
mPref
.
getSync
(
KEY_TEST_LONG_ELEMENT
,
0
));
mPref
.
flushSync
();
expect
(
4
).
assertEqual
(
mPref
.
getSync
(
KEY_TEST_LONG_ELEMENT
,
0
));
done
();
});
done
();
})
/**
...
...
@@ -252,17 +252,15 @@ describe('storageTest', function () {
*/
it
(
'
testPutString0162
'
,
0
,
async
function
(
done
)
{
mPref
.
clearSync
();
await
mPref
.
put
(
KEY_TEST_STRING_ELEMENT
,
"
abc
"
,
function
(
err
,
ret
)
{
mPref
.
put
(
KEY_TEST_STRING_ELEMENT
,
''
,
function
(
err
,
ret
)
{
expect
(
''
).
assertEqual
(
mPref
.
getSync
(
KEY_TEST_STRING_ELEMENT
,
"
defaultvalue
"
));
mPref
.
flushSync
();
expect
(
''
).
assertEqual
(
mPref
.
getSync
(
KEY_TEST_STRING_ELEMENT
,
"
defaultvalue
"
));
});
await
mPref
.
put
(
KEY_TEST_STRING_ELEMENT
,
''
,
function
(
err
,
ret
)
{
expect
(
''
).
assertEqual
(
mPref
.
getSync
(
KEY_TEST_STRING_ELEMENT
,
"
defaultvalue
"
));
mPref
.
flushSync
();
expect
(
''
).
assertEqual
(
mPref
.
getSync
(
KEY_TEST_STRING_ELEMENT
,
"
defaultvalue
"
));
done
();
});
done
();
})
/**
/**
* @tc.name flush callback interface test
* @tc.number SUB_DDM_AppDataFWK_JSPreferences_CallBack_0010
* @tc.desc flush callback interface test
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录