Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
28447dbe
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看板
未验证
提交
28447dbe
编写于
9月 11, 2022
作者:
O
openharmony_ci
提交者:
Gitee
9月 11, 2022
浏览文件
操作
浏览文件
下载
差异文件
!5409 【Distributeddatamgr】【master】用例优化
Merge pull request !5409 from 梁梁/master
上级
05b28e15
0a28555b
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
12 addition
and
28 deletion
+12
-28
distributeddatamgr/dataSharejstest/hap/src/main/js/test/DataAbilityPredicatesJsunit.test.js
.../hap/src/main/js/test/DataAbilityPredicatesJsunit.test.js
+2
-10
distributeddatamgr/relationalStorejstest/hap/src/main/js/test/RdbstoreInsertJsunit.test.js
...ejstest/hap/src/main/js/test/RdbstoreInsertJsunit.test.js
+8
-8
distributeddatamgr/relationalStorejstest/hap/src/main/js/test/RdbstorePredicatesJsunit.test.js
...est/hap/src/main/js/test/RdbstorePredicatesJsunit.test.js
+2
-10
未找到文件。
distributeddatamgr/dataSharejstest/hap/src/main/js/test/DataAbilityPredicatesJsunit.test.js
浏览文件 @
28447dbe
...
@@ -1910,11 +1910,7 @@ describe('dataAbilityPredicatesTest', function () {
...
@@ -1910,11 +1910,7 @@ describe('dataAbilityPredicatesTest', function () {
let
dataAbilityPredicates
=
await
new
dataAbility
.
DataAbilityPredicates
();
let
dataAbilityPredicates
=
await
new
dataAbility
.
DataAbilityPredicates
();
var
dataAbilityPredicatesInit
=
dataAbilityPredicates
var
dataAbilityPredicatesInit
=
dataAbilityPredicates
dataAbilityPredicates
.
equalTo
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
).
or
().
and
().
equalTo
(
"
integerValue
"
,
1
);
dataAbilityPredicates
.
equalTo
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
).
or
().
and
().
equalTo
(
"
integerValue
"
,
1
);
if
(
dataAbilityPredicatesInit
==
dataAbilityPredicates
){
expect
(
dataAbilityPredicates
==
dataAbilityPredicatesInit
).
assertTrue
();
expect
(
true
).
assertTrue
();
}
else
{
expect
(
null
).
assertFail
();
}
let
predicates
=
dataAbility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
dataAbility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
console
.
info
(
TAG
+
"
you should not start a request
"
+
"
with
\"
and
\"
or use or() before this function
"
);
console
.
info
(
TAG
+
"
you should not start a request
"
+
"
with
\"
and
\"
or use or() before this function
"
);
...
@@ -1935,11 +1931,7 @@ describe('dataAbilityPredicatesTest', function () {
...
@@ -1935,11 +1931,7 @@ describe('dataAbilityPredicatesTest', function () {
var
dataAbilityPredicatesInit
=
dataAbilityPredicates
var
dataAbilityPredicatesInit
=
dataAbilityPredicates
dataAbilityPredicates
.
equalTo
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
).
or
().
or
().
equalTo
(
"
integerValue
"
,
1
);
dataAbilityPredicates
.
equalTo
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
).
or
().
or
().
equalTo
(
"
integerValue
"
,
1
);
let
predicates
=
dataAbility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
let
predicates
=
dataAbility
.
createRdbPredicates
(
"
AllDataType
"
,
dataAbilityPredicates
);
if
(
dataAbilityPredicatesInit
==
dataAbilityPredicates
){
expect
(
dataAbilityPredicates
==
dataAbilityPredicatesInit
).
assertTrue
();
expect
(
true
).
assertTrue
();
}
else
{
expect
(
null
).
assertFail
();
}
console
.
info
(
TAG
+
"
you are starting a sql request with predicate or or,
"
console
.
info
(
TAG
+
"
you are starting a sql request with predicate or or,
"
+
"
using function or() immediately after another or(). that is ridiculous.
"
);
+
"
using function or() immediately after another or(). that is ridiculous.
"
);
}
}
...
...
distributeddatamgr/relationalStorejstest/hap/src/main/js/test/RdbstoreInsertJsunit.test.js
浏览文件 @
28447dbe
...
@@ -605,7 +605,7 @@ describe('rdbstoreInsertTest', function () {
...
@@ -605,7 +605,7 @@ describe('rdbstoreInsertTest', function () {
})
})
}
catch
(
err
){
}
catch
(
err
){
console
.
info
(
TAG
+
"
Batch insert data error:
"
+
err
)
console
.
info
(
TAG
+
"
Batch insert data error:
"
+
err
)
expect
(
err
==
null
).
assertTrue
()
;
expect
(
null
).
assertFail
();
;
}
}
done
()
done
()
console
.
info
(
TAG
+
"
************* testRdbStorebatchInsertPromise0006 end *************
"
);
console
.
info
(
TAG
+
"
************* testRdbStorebatchInsertPromise0006 end *************
"
);
...
@@ -628,7 +628,7 @@ describe('rdbstoreInsertTest', function () {
...
@@ -628,7 +628,7 @@ describe('rdbstoreInsertTest', function () {
})
})
}
catch
(
err
){
}
catch
(
err
){
console
.
info
(
TAG
+
"
Batch insert data error:
"
+
err
)
console
.
info
(
TAG
+
"
Batch insert data error:
"
+
err
)
expect
(
err
==
null
).
assertTrue
();
expect
(
null
).
assertFail
();
}
}
done
()
done
()
console
.
info
(
TAG
+
"
************* testRdbStorebatchInsertPromise0007 end *************
"
);
console
.
info
(
TAG
+
"
************* testRdbStorebatchInsertPromise0007 end *************
"
);
...
@@ -1045,14 +1045,14 @@ describe('rdbstoreInsertTest', function () {
...
@@ -1045,14 +1045,14 @@ describe('rdbstoreInsertTest', function () {
rdbStore
.
batchInsert
(
"
testCallback6
"
,
"
valueBuckets
"
,
(
err
,
data
)
=>
{
rdbStore
.
batchInsert
(
"
testCallback6
"
,
"
valueBuckets
"
,
(
err
,
data
)
=>
{
console
.
info
(
TAG
+
"
Affect row is
"
+
data
)
console
.
info
(
TAG
+
"
Affect row is
"
+
data
)
if
(
err
!=
null
){
if
(
err
!=
null
){
expect
(
err
==
null
).
assertTrue
()
expect
(
null
).
assertFail
();
}
else
{
}
else
{
expect
(
data
).
assertEqual
(
-
1
)
expect
(
data
).
assertEqual
(
-
1
)
}
}
})
})
}
catch
(
err
){
}
catch
(
err
){
console
.
info
(
TAG
+
"
Batch insert data error:
"
+
err
)
console
.
info
(
TAG
+
"
Batch insert data error:
"
+
err
)
expect
(
err
==
null
).
assertTrue
();
expect
(
null
).
assertFail
();
}
}
})
})
...
@@ -1073,7 +1073,7 @@ describe('rdbstoreInsertTest', function () {
...
@@ -1073,7 +1073,7 @@ describe('rdbstoreInsertTest', function () {
await
rdbStore
.
batchInsert
(
"
testCallback7
"
,
(
err
,
data
)
=>
{
await
rdbStore
.
batchInsert
(
"
testCallback7
"
,
(
err
,
data
)
=>
{
console
.
info
(
TAG
+
"
Affect row is
"
+
data
)
console
.
info
(
TAG
+
"
Affect row is
"
+
data
)
if
(
err
!=
null
){
if
(
err
!=
null
){
expect
(
err
==
null
).
assertTrue
();
expect
(
null
).
assertFail
();
}
else
{
}
else
{
expect
(
data
).
assertEqual
(
-
1
)
expect
(
data
).
assertEqual
(
-
1
)
}
}
...
@@ -1081,12 +1081,12 @@ describe('rdbstoreInsertTest', function () {
...
@@ -1081,12 +1081,12 @@ describe('rdbstoreInsertTest', function () {
console
.
info
(
TAG
+
"
Batch insert fail ,affect row number is:
"
+
data
)
console
.
info
(
TAG
+
"
Batch insert fail ,affect row number is:
"
+
data
)
expect
(
data
).
assertEqual
(
-
1
)
expect
(
data
).
assertEqual
(
-
1
)
})
})
}).
then
((
err
)
=>
{
}).
catch
((
err
)
=>
{
expect
(
err
==
null
).
assertTrue
();
expect
(
null
).
assertFail
();
})
})
}
catch
(
err
){
}
catch
(
err
){
console
.
info
(
TAG
+
"
Batch insert data error:
"
+
err
)
console
.
info
(
TAG
+
"
Batch insert data error:
"
+
err
)
expect
(
err
==
null
).
assertTrue
();
expect
(
null
).
assertFail
();
}
}
done
()
done
()
console
.
info
(
TAG
+
"
************* testRdbStorebatchInsertCallback0007 end *************
"
);
console
.
info
(
TAG
+
"
************* testRdbStorebatchInsertCallback0007 end *************
"
);
...
...
distributeddatamgr/relationalStorejstest/hap/src/main/js/test/RdbstorePredicatesJsunit.test.js
浏览文件 @
28447dbe
...
@@ -1727,11 +1727,7 @@ describe('rdbPredicatesTest', function () {
...
@@ -1727,11 +1727,7 @@ describe('rdbPredicatesTest', function () {
let
predicates
=
await
new
dataRdb
.
RdbPredicates
(
"
AllDataType
"
);
let
predicates
=
await
new
dataRdb
.
RdbPredicates
(
"
AllDataType
"
);
var
predicatesInit
=
predicates
var
predicatesInit
=
predicates
predicates
.
equalTo
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
).
or
().
and
().
equalTo
(
"
integerValue
"
,
1
);
predicates
.
equalTo
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
).
or
().
and
().
equalTo
(
"
integerValue
"
,
1
);
if
(
predicates
==
predicatesInit
){
expect
(
predicates
==
predicatesInit
).
assertTrue
();
expect
(
true
).
assertTrue
();
}
else
{
expect
(
null
).
assertFail
();
}
console
.
info
(
TAG
+
"
you should not start a request
"
+
"
with
\"
and
\"
or use or() before this function
"
);
console
.
info
(
TAG
+
"
you should not start a request
"
+
"
with
\"
and
\"
or use or() before this function
"
);
}
}
done
();
done
();
...
@@ -1749,11 +1745,7 @@ describe('rdbPredicatesTest', function () {
...
@@ -1749,11 +1745,7 @@ describe('rdbPredicatesTest', function () {
let
predicates
=
await
new
dataRdb
.
RdbPredicates
(
"
AllDataType
"
);
let
predicates
=
await
new
dataRdb
.
RdbPredicates
(
"
AllDataType
"
);
var
predicatesInit
=
predicates
var
predicatesInit
=
predicates
predicates
.
equalTo
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
).
or
().
or
().
equalTo
(
"
integerValue
"
,
1
);
predicates
.
equalTo
(
"
stringValue
"
,
"
ABCDEFGHIJKLMN
"
).
or
().
or
().
equalTo
(
"
integerValue
"
,
1
);
if
(
predicates
==
predicatesInit
){
expect
(
predicates
==
predicatesInit
).
assertTrue
();
expect
(
true
).
assertTrue
();
}
else
{
expect
(
null
).
assertFail
();
}
console
.
info
(
TAG
+
"
you are starting a sql request with predicate or or,
"
console
.
info
(
TAG
+
"
you are starting a sql request with predicate or or,
"
+
"
using function or() immediately after another or(). that is ridiculous.
"
);
+
"
using function or() immediately after another or(). that is ridiculous.
"
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录