未验证 提交 5e70d4b4 编写于 作者: O openharmony_ci 提交者: Gitee

!3342 【Distributeddatamgr】【Master】DataAbilityPredicatesJsunit.test.js用例修改

Merge pull request !3342 from Maowen/master
......@@ -2365,5 +2365,73 @@ describe('dataAbilityPredicatesTest', function () {
done();
console.log(TAG + "************* testNotIn0003 end *************");
})
/**
* @tc.name predicates in normal test
* @tc.number SUB_DDM_AppDataFWK_JSRDB_DataAbilityPredicates_0253
* @tc.desc predicates in normal test
*/
it('testIn0001', 0, async function (done) {
console.log(TAG + "************* testIn0001 start *************");
var values = [Number.MIN_VALUE.toString()];
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.in("doubleValue", values);
let predicates = dataAbility.createRdbPredicates("AllDataType", dataAbilityPredicates);
let result = await rdbStore.query(predicates);
expect(1).assertEqual(result.rowCount);
done();
console.log(TAG + "************* testIn0001 end *************");
})
/**
* @tc.name predicates in normal test
* @tc.number SUB_DDM_AppDataFWK_JSRDB_DataAbilityPredicates_0254
* @tc.desc predicates in normal test
*/
it('testIn0002', 0, async function (done) {
console.log(TAG + "************* testIn0002 start *************");
var values = ["1.0"];
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.in("doubleValue", values);
let predicates = dataAbility.createRdbPredicates("AllDataType", dataAbilityPredicates);
let result = await rdbStore.query(predicates);
expect(1).assertEqual(result.rowCount);
done();
console.log(TAG + "************* testIn0002 end *************");
})
/**
* @tc.name predicates in normal test
* @tc.number SUB_DDM_AppDataFWK_JSRDB_DataAbilityPredicates_0255
* @tc.desc predicates in normal test
*/
it('testIn0003', 0, async function (done) {
console.log(TAG + "************* testIn0003 start *************");
var values = [DOUBLE_MAX.toString()];
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.in("doubleValue", values);
let predicates = dataAbility.createRdbPredicates("AllDataType", dataAbilityPredicates);
let result = await rdbStore.query(predicates);
expect(1).assertEqual(result.rowCount);
done();
console.log(TAG + "************* testIn0003 end *************");
})
/**
* @tc.name predicates in normal test
* @tc.number SUB_DDM_AppDataFWK_JSRDB_DataAbilityPredicates_0256
* @tc.desc predicates in normal test
*/
it('testIn0004', 0, async function (done) {
console.log(TAG + "************* testIn0004 start *************");
var values = [Number.MIN_VALUE.toString(), "1.0", DOUBLE_MAX.toString()];
let dataAbilityPredicates = await new dataAbility.DataAbilityPredicates();
dataAbilityPredicates.in("doubleValue", values);
let predicates = dataAbility.createRdbPredicates("AllDataType", dataAbilityPredicates);
let result = await rdbStore.query(predicates);
expect(3).assertEqual(result.rowCount);
done();
console.log(TAG + "************* testIn0004 end *************");
})
console.log(TAG + "*************Unit Test End*************");
})
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册