Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
e751847a
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看板
提交
e751847a
编写于
9月 16, 2022
作者:
L
liangzhenyu123
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
liangzhenyu6@huawei.com
Signed-off-by:
N
liangzhenyu123
<
liangzhenyu6@huawei.com
>
上级
d0ac528a
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
12 addition
and
75 deletion
+12
-75
distributeddatamgr/kvStoretest/kvStorejstest/hap/src/main/js/test/DeviceKvStoreCallbackJsunit.test.js
.../hap/src/main/js/test/DeviceKvStoreCallbackJsunit.test.js
+2
-4
distributeddatamgr/kvStoretest/kvStorejstest/hap/src/main/js/test/DeviceKvStorePromiseJsunit.test.js
...t/hap/src/main/js/test/DeviceKvStorePromiseJsunit.test.js
+4
-4
distributeddatamgr/kvStoretest/kvStorejstest/hap/src/main/js/test/SingleKvStoreCallbackJsunit.test.js
.../hap/src/main/js/test/SingleKvStoreCallbackJsunit.test.js
+2
-4
distributeddatamgr/kvStoretest/kvStorejstest/hap/src/main/js/test/SingleKvStorePromiseJsunit.test.js
...t/hap/src/main/js/test/SingleKvStorePromiseJsunit.test.js
+4
-3
distributeddatamgr/relationalStorejstest/hap/src/main/js/test/RdbStoreResultSetJsunit.test.js
...test/hap/src/main/js/test/RdbStoreResultSetJsunit.test.js
+0
-60
未找到文件。
distributeddatamgr/kvStoretest/kvStorejstest/hap/src/main/js/test/DeviceKvStoreCallbackJsunit.test.js
浏览文件 @
e751847a
...
@@ -1801,16 +1801,14 @@ describe('deviceKvStoreCallbackTest', function () {
...
@@ -1801,16 +1801,14 @@ describe('deviceKvStoreCallbackTest', function () {
await
kvStore
.
removeDeviceData
(
''
,
function
(
err
,
data
)
{
await
kvStore
.
removeDeviceData
(
''
,
function
(
err
,
data
)
{
if
(
err
==
undefined
)
{
if
(
err
==
undefined
)
{
console
.
info
(
'
testDeviceKvStoreRemoveDeviceData103 removeDeviceData success
'
);
console
.
info
(
'
testDeviceKvStoreRemoveDeviceData103 removeDeviceData success
'
);
expect
(
err
==
undefined
).
assertTrue
();
}
else
{
console
.
info
(
'
testDeviceKvStoreRemoveDeviceData103 removeDeviceData fail
'
+
err
);
expect
(
null
).
assertFail
();
expect
(
null
).
assertFail
();
}
else
{
console
.
info
(
'
testDeviceKvStoreRemoveDeviceData103 removeDeviceData fail
'
);
}
}
done
();
done
();
});
});
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
info
(
'
testDeviceKvStoreRemoveDeviceData103 e
'
+
e
);
console
.
info
(
'
testDeviceKvStoreRemoveDeviceData103 e
'
+
e
);
expect
(
null
).
assertFail
();
done
();
done
();
}
}
})
})
...
...
distributeddatamgr/kvStoretest/kvStorejstest/hap/src/main/js/test/DeviceKvStorePromiseJsunit.test.js
浏览文件 @
e751847a
...
@@ -1987,14 +1987,14 @@ describe('deviceKvStorePromiseTest', function () {
...
@@ -1987,14 +1987,14 @@ describe('deviceKvStorePromiseTest', function () {
* @tc.name [JS-API8]DeviceKvStore.RemoveDeviceData()
* @tc.name [JS-API8]DeviceKvStore.RemoveDeviceData()
* @tc.desc Test Js Api DeviceKvStore.RemoveDeviceData() testcase 003
* @tc.desc Test Js Api DeviceKvStore.RemoveDeviceData() testcase 003
*/
*/
it
(
'
testDeviceKvStoreRemoveDeviceData003
'
,
0
,
async
function
(
done
)
{
it
(
'
testDeviceKvStoreRemoveDeviceData003
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
testDeviceKvStoreRemoveDeviceData003
'
);
console
.
info
(
'
testDeviceKvStoreRemoveDeviceData003
'
);
try
{
try
{
await
kvStore
.
removeDeviceData
(
''
).
then
(()
=>
{
await
kvStore
.
removeDeviceData
(
''
).
then
((
data
)
=>
{
console
.
info
(
'
testDeviceKvStoreRemoveDeviceData003 removeDeviceData success
'
);
console
.
info
(
'
testDeviceKvStoreRemoveDeviceData003 removeDeviceData success
'
);
expect
(
null
).
assertFail
();
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
testDeviceKvStoreRemoveDeviceData003 removeDeviceData fail
'
+
err
);
console
.
info
(
'
testDeviceKvStoreRemoveDeviceData003 removeDeviceData fail
'
+
err
);
expect
(
null
).
assertFail
();
});
});
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
info
(
'
testDeviceKvStoreRemoveDeviceData003 e
'
+
e
);
console
.
info
(
'
testDeviceKvStoreRemoveDeviceData003 e
'
+
e
);
...
@@ -2010,7 +2010,7 @@ describe('deviceKvStorePromiseTest', function () {
...
@@ -2010,7 +2010,7 @@ describe('deviceKvStorePromiseTest', function () {
it
(
'
testDeviceKvStoreRemoveDeviceData004
'
,
0
,
async
function
(
done
)
{
it
(
'
testDeviceKvStoreRemoveDeviceData004
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
testDeviceKvStoreRemoveDeviceData004
'
);
console
.
info
(
'
testDeviceKvStoreRemoveDeviceData004
'
);
try
{
try
{
await
kvStore
.
removeDeviceData
(
null
).
then
((
err
)
=>
{
await
kvStore
.
removeDeviceData
(
null
).
then
((
data
)
=>
{
console
.
info
(
'
testDeviceKvStoreRemoveDeviceData004 removeDeviceData success
'
);
console
.
info
(
'
testDeviceKvStoreRemoveDeviceData004 removeDeviceData success
'
);
expect
(
null
).
assertFail
();
expect
(
null
).
assertFail
();
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
...
...
distributeddatamgr/kvStoretest/kvStorejstest/hap/src/main/js/test/SingleKvStoreCallbackJsunit.test.js
浏览文件 @
e751847a
...
@@ -1760,16 +1760,14 @@ describe('singleKvStoreCallbackTest', function () {
...
@@ -1760,16 +1760,14 @@ describe('singleKvStoreCallbackTest', function () {
await
kvStore
.
removeDeviceData
(
''
,
function
(
err
,
data
)
{
await
kvStore
.
removeDeviceData
(
''
,
function
(
err
,
data
)
{
if
(
err
==
undefined
)
{
if
(
err
==
undefined
)
{
console
.
info
(
'
testSingleKvStoreRemoveDeviceData103 removeDeviceData success
'
);
console
.
info
(
'
testSingleKvStoreRemoveDeviceData103 removeDeviceData success
'
);
expect
(
err
==
undefined
).
assertTrue
();
}
else
{
console
.
info
(
'
testSingleKvStoreRemoveDeviceData103 removeDeviceData fail:
'
+
err
);
expect
(
null
).
assertFail
();
expect
(
null
).
assertFail
();
}
else
{
console
.
info
(
'
testSingleKvStoreRemoveDeviceData103 removeDeviceData fail
'
);
}
}
done
();
done
();
});
});
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
info
(
'
testSingleKvStoreRemoveDeviceData103 e
'
+
e
);
console
.
info
(
'
testSingleKvStoreRemoveDeviceData103 e
'
+
e
);
expect
(
null
).
assertFail
();
done
();
done
();
}
}
})
})
...
...
distributeddatamgr/kvStoretest/kvStorejstest/hap/src/main/js/test/SingleKvStorePromiseJsunit.test.js
浏览文件 @
e751847a
...
@@ -1956,14 +1956,14 @@ describe('singleKvStorePromiseTest', function () {
...
@@ -1956,14 +1956,14 @@ describe('singleKvStorePromiseTest', function () {
* @tc.name [JS-API8]SingleKvStoreRemoveDeviceData.
* @tc.name [JS-API8]SingleKvStoreRemoveDeviceData.
* @tc.desc Test Js Api SingleKvStoreRemoveDeviceData testcase 003
* @tc.desc Test Js Api SingleKvStoreRemoveDeviceData testcase 003
*/
*/
it
(
'
testSingleKvStoreRemoveDeviceData003
'
,
0
,
async
function
(
done
)
{
it
(
'
testSingleKvStoreRemoveDeviceData003
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
testSingleKvStoreRemoveDeviceData003
'
);
console
.
info
(
'
testSingleKvStoreRemoveDeviceData003
'
);
try
{
try
{
await
kvStore
.
removeDeviceData
(
''
).
then
(()
=>
{
await
kvStore
.
removeDeviceData
(
''
).
then
((
data
)
=>
{
console
.
info
(
'
testSingleKvStoreRemoveDeviceData003 removeDeviceData success
'
);
console
.
info
(
'
testSingleKvStoreRemoveDeviceData003 removeDeviceData success
'
);
expect
(
null
).
assertFail
();
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
'
testSingleKvStoreRemoveDeviceData003 removeDeviceData fail
'
+
err
);
console
.
info
(
'
testSingleKvStoreRemoveDeviceData003 removeDeviceData fail
'
+
err
);
expect
(
null
).
assertFail
();
});
});
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
info
(
'
testSingleKvStoreRemoveDeviceData003 e
'
+
e
);
console
.
info
(
'
testSingleKvStoreRemoveDeviceData003 e
'
+
e
);
...
@@ -1971,6 +1971,7 @@ describe('singleKvStorePromiseTest', function () {
...
@@ -1971,6 +1971,7 @@ describe('singleKvStorePromiseTest', function () {
done
();
done
();
})
})
/**
/**
* @tc.number SUB_DISTRIBUTEDDATAMGR_SINGLEKVSTORE_REMOVEDEVICEDATA_0400
* @tc.number SUB_DISTRIBUTEDDATAMGR_SINGLEKVSTORE_REMOVEDEVICEDATA_0400
* @tc.name [JS-API8]SingleKvStoreRemoveDeviceData.
* @tc.name [JS-API8]SingleKvStoreRemoveDeviceData.
...
...
distributeddatamgr/relationalStorejstest/hap/src/main/js/test/RdbStoreResultSetJsunit.test.js
浏览文件 @
e751847a
...
@@ -1832,66 +1832,6 @@ describe('rdbResultSetTest', function () {
...
@@ -1832,66 +1832,6 @@ describe('rdbResultSetTest', function () {
console
.
log
(
TAG
+
"
************* testBigData0001 end *************
"
);
console
.
log
(
TAG
+
"
************* testBigData0001 end *************
"
);
}
}
})
})
/**
* @tc.name big resultSet data test
* @tc.number SUB_DDM_AppDataFWK_JSRDB_ResultSet_0251
* @tc.desc big resultSet data test
*/
it
(
'
testBigData0002
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testBigData0002 start *************
"
);
{
await
createBigData
(
500
);
let
resultSet
=
await
rdbStore
.
querySql
(
"
SELECT * FROM test
"
);
let
count
=
resultSet
.
rowCount
;
expect
(
500
).
assertEqual
(
count
);
resultSet
.
goToLastRow
();
let
i
=
resultSet
.
rowCount
;
while
(
i
>=
1
)
{
expect
(
"
test
"
+
--
i
).
assertEqual
(
resultSet
.
getString
(
1
))
resultSet
.
goToPreviousRow
();
}
resultSet
.
close
()
expect
(
true
).
assertEqual
(
resultSet
.
isClosed
)
resultSet
=
null
;
done
();
console
.
log
(
TAG
+
"
************* testBigData0002 end *************
"
);
}
})
/**
* @tc.name big resultSet data test
* @tc.number SUB_DDM_AppDataFWK_JSRDB_ResultSet_0252
* @tc.desc big resultSet data test
*/
it
(
'
testBigData0003
'
,
0
,
async
function
(
done
)
{
console
.
log
(
TAG
+
"
************* testBigData0003 start *************
"
);
{
await
createBigData
(
1
);
let
resultSet
=
await
rdbStore
.
querySql
(
"
SELECT * FROM test
"
);
let
count
=
resultSet
.
rowCount
;
expect
(
1
).
assertEqual
(
count
);
resultSet
.
goToFirstRow
();
expect
(
true
).
assertEqual
(
resultSet
.
isStarted
);
expect
(
"
test0
"
).
assertEqual
(
resultSet
.
getString
(
1
))
let
rows
=
[
1
,
2
,
-
1
,
-
2
];
for
(
const
i
of
rows
)
{
resultSet
.
goToRow
(
i
);
expect
(
true
).
assertEqual
(
resultSet
.
isStarted
);
expect
(
""
).
assertEqual
(
resultSet
.
getString
(
1
))
}
resultSet
.
close
()
expect
(
true
).
assertEqual
(
resultSet
.
isClosed
)
resultSet
=
null
;
done
();
console
.
log
(
TAG
+
"
************* testBigData0003 end *************
"
);
}
})
console
.
info
(
TAG
+
'
*************Unit Test End*************
'
);
console
.
info
(
TAG
+
'
*************Unit Test End*************
'
);
})
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录