提交 6258fbb5 编写于 作者: M Maowen

<zhangmaowen@huawei.com>

Signed-off-by: NMaowen <zhangmaowen@huawei.com>
上级 ea6a1f34
...@@ -352,10 +352,10 @@ describe('storageTest', function () { ...@@ -352,10 +352,10 @@ describe('storageTest', function () {
*/ */
it('testFlush00181', 0, async function (done) { it('testFlush00181', 0, async function (done) {
mPref.putSync(KEY_TEST_STRING_ELEMENT, "test"); mPref.putSync(KEY_TEST_STRING_ELEMENT, "test");
mPref.flushSync();
const promise = mPref.flush(); const promise = mPref.flush();
promise.then((ret) => { promise.then((ret) => {
expect("test"). expect("test").assertEqual(mPref.getSync(KEY_TEST_STRING_ELEMENT, "defaultvalue"));
assertEqual(mPref.getSync(KEY_TEST_STRING_ELEMENT, "default"));
}).catch((err) => { }).catch((err) => {
expect(null).assertFail(); expect(null).assertFail();
}); });
...@@ -369,6 +369,9 @@ describe('storageTest', function () { ...@@ -369,6 +369,9 @@ describe('storageTest', function () {
* @tc.desc const test * @tc.desc const test
*/ */
it('testConst001', 0, function () { it('testConst001', 0, function () {
mPref = storage.getStorageSync(PATH);
console.info("testConstKEY " +MAX_KEY_LENHTH)
console.info("testConstVALUE " +MAX_VALUE_LENHTH)
expect("80").assertEqual(mPref.MAX_KEY_LENHTH); expect("80").assertEqual(mPref.MAX_KEY_LENHTH);
expect("8192").assertEqual(mPref.MAX_VALUE_LENHTH); expect("8192").assertEqual(mPref.MAX_VALUE_LENHTH);
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册