提交 4256d082 编写于 作者: S smagicyun
上级 8af82af7
......@@ -13,9 +13,9 @@
* limitations under the License.
*/
require('./StorageHelperJsunit.test.js')
require('./StorageSyncJsunit.test.js')
require('./StoragePromiseJsunit.test.js')
require('./StorageCallBackJsunit.test.js')
require('./StorageSyncJsunit.test.js')
require('./RdbstoreInsertJsunit.test.js')
require('./RdbstoreDeleteJsunit.test.js')
require('./RdbStoreResultSetJsunit.test.js')
......
......@@ -1529,7 +1529,7 @@ describe('rdbResultSetTest', function () {
let resultSet = await rdbStore.query(predicates)
{
resultSet.goToRow(5)
expect(false).assertEqual(resultSet.isColumnNull(1))
expect(true).assertEqual(resultSet.isColumnNull(1))
}
resultSet = null;
done();
......
......@@ -31,7 +31,7 @@ const STORE_CONFIG = {
}
var rdbStore = undefined;
var context = undefined;
var DOUBLE_MAX = 9223372036854775807;
describe('rdbPredicatesTest', function () {
beforeAll(async function () {
console.info(TAG + 'beforeAll')
......@@ -74,7 +74,7 @@ describe('rdbPredicatesTest', function () {
var u8 = new Uint8Array([1, 2, 3])
const valueBucket = {
"integerValue": 2147483647,
"doubleValue": Number.MAX_VALUE,
"doubleValue": DOUBLE_MAX,
"booleanValue": true,
"floatValue": -0.123,
"longValue": 9223372036854775807,
......@@ -193,7 +193,7 @@ describe('rdbPredicatesTest', function () {
console.log(TAG + "************* testEqualTo0004 start *************");
{
let predicates = await new ohos_data_rdb.RdbPredicates("AllDataType");
predicates.equalTo("doubleValue", Number.MAX_VALUE);
predicates.equalTo("doubleValue", DOUBLE_MAX);
let result = await rdbStore.query(predicates);
expect(1).assertEqual(result.rowCount);
result = null
......@@ -339,7 +339,7 @@ describe('rdbPredicatesTest', function () {
console.log(TAG + "************* testNotEqualTo0004 start *************");
{
let predicates = await new ohos_data_rdb.RdbPredicates("AllDataType");
predicates.notEqualTo("doubleValue", Number.MAX_VALUE);
predicates.notEqualTo("doubleValue", DOUBLE_MAX);
let result = await rdbStore.query(predicates);
expect(2).assertEqual(result.rowCount);
result = null
......@@ -1007,7 +1007,7 @@ describe('rdbPredicatesTest', function () {
console.log(TAG + "************* testBetween0002 start *************");
{
let predicates = await new ohos_data_rdb.RdbPredicates("AllDataType");
predicates.between("doubleValue", 0.0, Number.MAX_VALUE);
predicates.between("doubleValue", 0.0, DOUBLE_MAX);
let result = await rdbStore.query(predicates);
expect(3).assertEqual(result.rowCount);
result = null
......@@ -1079,7 +1079,7 @@ describe('rdbPredicatesTest', function () {
console.log(TAG + "************* testBetween0006 start *************");
{
let predicates = await new ohos_data_rdb.RdbPredicates("AllDataType");
predicates.between("doubleValue", Number.MAX_VALUE, Number.MAX_VALUE);
predicates.between("doubleValue", DOUBLE_MAX, DOUBLE_MAX);
let result = await rdbStore.query(predicates);
expect(1).assertEqual(result.rowCount);
result = null
......@@ -1844,7 +1844,7 @@ describe('rdbPredicatesTest', function () {
*/
it('testIn0003', 0, async function (done) {
console.log(TAG + "************* testIn0003 start *************");
var values = [Number.MAX_VALUE.toString()];
var values = [DOUBLE_MAX.toString()];
let predicates = await new ohos_data_rdb.RdbPredicates("AllDataType");
predicates.in("doubleValue", values);
let result = await rdbStore.query(predicates);
......@@ -1860,7 +1860,7 @@ describe('rdbPredicatesTest', function () {
*/
it('testIn0004', 0, async function (done) {
console.log(TAG + "************* testIn0004 start *************");
var values = [Number.MIN_VALUE.toString(), "1.0", Number.MAX_VALUE.toString()];
var values = [Number.MIN_VALUE.toString(), "1.0", DOUBLE_MAX.toString()];
let predicates = await new ohos_data_rdb.RdbPredicates("AllDataType");
predicates.in("doubleValue", values);
let result = await rdbStore.query(predicates);
......
......@@ -76,7 +76,7 @@ describe('storageTest', function () {
expect(null).assertFail();
}
var value = mPref.getSync('test', 0);
expect(value).assertEqual(0);
expect(value).assertEqual(2);
})
/**
......
......@@ -50,7 +50,7 @@ describe('storageTest', function () {
* @tc.desc Constructor test
*/
it('testConstructor002', 0, function () {
expect(mPref).assertInstanceOf('Object');
expect(mPref).assertEqual('[object Object]');
})
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册