未验证 提交 6536f879 编写于 作者: O openharmony_ci 提交者: Gitee

!7398 【distributeddatamgr】【3.1 Release】用例修改,FieldNode的 ValueType修改

Merge pull request !7398 from wuxiaodan/OpenHarmony-3.1-Release
...@@ -168,11 +168,12 @@ describe('FieldNodeTest', function() { ...@@ -168,11 +168,12 @@ describe('FieldNodeTest', function() {
it('testtype001', 0, async function(done) { it('testtype001', 0, async function(done) {
try { try {
let node = new ddm.FieldNode('first'); let node = new ddm.FieldNode('first');
node.type = ddm.type.STRING; node.type = ddm.ValueType.STRING;
console.info('type = ' + node.type); console.info('testtype001 type = ' + node.type);
expect(node.type === ddm.type.STRING).assertTrue() expect(node.type === ddm.ValueType.STRING).assertTrue();
} catch (e) { } catch (e) {
console.log("testtype001 fail on exception: " + e); console.log("testtype001 fail on exception: " + e);
expect(null).assertFail();
} }
done(); done();
}) })
...@@ -185,11 +186,12 @@ describe('FieldNodeTest', function() { ...@@ -185,11 +186,12 @@ describe('FieldNodeTest', function() {
it('testtype002', 0, async function(done) { it('testtype002', 0, async function(done) {
try { try {
let node = new ddm.FieldNode('first'); let node = new ddm.FieldNode('first');
node.type = ddm.type.INTEGER; node.type = ddm.ValueType.INTEGER;
console.info('type = ' + node.type); console.info('testtype002 type = ' + node.type);
expect(node.type === ddm.type.INTEGER).assertTrue() expect(node.type === ddm.ValueType.INTEGER).assertTrue();
} catch (e) { } catch (e) {
console.log("testtype002 fail on exception: " + e); console.log("testtype002 fail on exception: " + e);
expect(null).assertFail();
} }
done(); done();
}) })
...@@ -202,11 +204,12 @@ describe('FieldNodeTest', function() { ...@@ -202,11 +204,12 @@ describe('FieldNodeTest', function() {
it('testtype003', 0, async function(done) { it('testtype003', 0, async function(done) {
try { try {
let node = new ddm.FieldNode('first'); let node = new ddm.FieldNode('first');
node.type = ddm.type.FLOAT; node.type = ddm.ValueType.FLOAT;
console.info('type = ' + node.type); console.info('testtype003 type = ' + node.type);
expect(node.type === ddm.type.FLOAT).assertTrue() expect(node.type === ddm.ValueType.FLOAT).assertTrue();
} catch (e) { } catch (e) {
console.log("testtype003 fail on exception: " + e); console.log("testtype003 fail on exception: " + e);
expect(null).assertFail();
} }
done(); done();
}) })
...@@ -219,11 +222,12 @@ describe('FieldNodeTest', function() { ...@@ -219,11 +222,12 @@ describe('FieldNodeTest', function() {
it('testtype004', 0, async function(done) { it('testtype004', 0, async function(done) {
try { try {
let node = new ddm.FieldNode('first'); let node = new ddm.FieldNode('first');
node.type = ddm.type.BYTE_ARRAY; node.type = ddm.ValueType.BYTE_ARRAY;
console.info('type = ' + node.type); console.info('testtype004 type = ' + node.type);
expect(node.type === ddm.type.BYTE_ARRAY).assertTrue() expect(node.type === ddm.ValueType.BYTE_ARRAY).assertTrue();
} catch (e) { } catch (e) {
console.log("testtype004 fail on exception: " + e); console.log("testtype004 fail on exception: " + e);
expect(null).assertFail();
} }
done(); done();
}) })
...@@ -236,11 +240,12 @@ describe('FieldNodeTest', function() { ...@@ -236,11 +240,12 @@ describe('FieldNodeTest', function() {
it('testtype005', 0, async function(done) { it('testtype005', 0, async function(done) {
try { try {
let node = new ddm.FieldNode('first'); let node = new ddm.FieldNode('first');
node.type = ddm.type.BOOLEAN; node.type = ddm.ValueType.BOOLEAN;
console.info('type = ' + node.type); console.info('testtype005 type = ' + node.type);
expect(node.type === ddm.ValueType.BOOLEAN).assertTrue() expect(node.type === ddm.ValueType.BOOLEAN).assertTrue();
} catch (e) { } catch (e) {
console.log("testtype005 fail on exception: " + e); console.log("testtype005 fail on exception: " + e);
expect(null).assertFail();
} }
done(); done();
}) })
...@@ -253,11 +258,12 @@ describe('FieldNodeTest', function() { ...@@ -253,11 +258,12 @@ describe('FieldNodeTest', function() {
it('testtype006', 0, async function(done) { it('testtype006', 0, async function(done) {
try { try {
let node = new ddm.FieldNode('first'); let node = new ddm.FieldNode('first');
node.type = ddm.type.DOUBLE; node.type = ddm.ValueType.DOUBLE;
console.info('type = ' + node.type); console.info('testtype006 type = ' + node.type);
expect(node.type === ddm.type.DOUBLE).assertTrue() expect(node.type === ddm.ValueType.DOUBLE).assertTrue();
} catch (e) { } catch (e) {
console.log("testtype006 fail on exception: " + e); console.log("testtype006 fail on exception: " + e);
expect(null).assertFail();
} }
done(); done();
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册