提交 067da163 编写于 作者: Y yanglifeng1217

<modified>

Signed-off-by: Nyanglifeng1217 <yanglifeng5@huawei.com>
上级 28aa6e61
...@@ -138,6 +138,7 @@ export default function relationalStoreAssetResultSetTest() { ...@@ -138,6 +138,7 @@ export default function relationalStoreAssetResultSetTest() {
await rdbStore.insert("test", valuesBucket); await rdbStore.insert("test", valuesBucket);
valuesBucket = { valuesBucket = {
"data1": asset1, "data1": asset1,
"data3": new Array()
} }
await rdbStore.insert("test", valuesBucket); await rdbStore.insert("test", valuesBucket);
console.log(TAG + "createTest data end"); console.log(TAG + "createTest data end");
...@@ -241,17 +242,17 @@ export default function relationalStoreAssetResultSetTest() { ...@@ -241,17 +242,17 @@ export default function relationalStoreAssetResultSetTest() {
expect(true).assertEqual(resultSet.goToNextRow()) expect(true).assertEqual(resultSet.goToNextRow())
const id = resultSet.getLong(resultSet.getColumnIndex("id")) const id = resultSet.getLong(resultSet.getColumnIndex("id"))
const data2 = resultSet.getAsset(resultSet.getColumnIndex("data2")) const data2 = resultSet.getAsset(resultSet.getColumnIndex("data2"))
expect(null).assertFail(); console.log(TAG + "id=" + id + ", data2=" + data2);
} catch (e) { expect(data2).assertEqual(null);
console.log(TAG + "testGetAsset0003 throw error: " + e.code);
expect(e.code == 14800000).assertTrue();
} finally {
resultSet.close(); resultSet.close();
expect(true).assertEqual(resultSet.isClosed) expect(true).assertEqual(resultSet.isClosed)
resultSet = null } catch (e) {
done(); expect(null).assertFail();
console.log(TAG + "************* testGetAsset0003 end *************");
} }
resultSet = null
done();
console.log(TAG + "************* testGetAsset0003 end *************");
}) })
/** /**
...@@ -636,19 +637,19 @@ export default function relationalStoreAssetResultSetTest() { ...@@ -636,19 +637,19 @@ export default function relationalStoreAssetResultSetTest() {
expect(true).assertEqual(resultSet.goToNextRow()) expect(true).assertEqual(resultSet.goToNextRow())
const id = resultSet.getLong(resultSet.getColumnIndex("id")) const id = resultSet.getLong(resultSet.getColumnIndex("id"))
const data3 = resultSet.getAssets(resultSet.getColumnIndex("data3")) const data3 = resultSet.getAssets(resultSet.getColumnIndex("data3"))
expect(null).assertFail(); console.log(TAG + "id=" + id + ", data3=" + data3);
} catch (e) { expect(data3.length).assertEqual(0);
console.log(TAG + "testGetAssets0003 throw error" + e);
expect(e.code == 14800000).assertTrue();
} finally {
resultSet.close(); resultSet.close();
expect(true).assertEqual(resultSet.isClosed) expect(true).assertEqual(resultSet.isClosed)
resultSet = null } catch (e) {
done(); expect(null).assertFail();
console.log(TAG + "************* testGetAssets0003 end *************");
} }
resultSet = null
done();
console.log(TAG + "************* testGetAssets0003 end *************");
}) })
console.info(TAG + "*************Unit Test End*************") console.info(TAG + "*************Unit Test End*************")
}) })
} }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册