未验证 提交 8778a6a6 编写于 作者: O openharmony_ci 提交者: Gitee

!7372 【distributeddatamgr】【master】用例修改,FieldNode的 ValueType修改

Merge pull request !7372 from wuxiaodan/master
...@@ -179,11 +179,12 @@ describe('FieldNodeTest', function() { ...@@ -179,11 +179,12 @@ describe('FieldNodeTest', function() {
it('SUB_DDM_DKV_FIELDNODE_TYPE_0100', 0, async function(done) { it('SUB_DDM_DKV_FIELDNODE_TYPE_0100', 0, async function(done) {
try { try {
let node = new ddm.FieldNode('first'); let node = new ddm.FieldNode('first');
node.type = ddm.value.type.STRING; node.type = ddm.ValueType.STRING;
console.info('type = ' + node.type); console.info('SUB_DDM_DKV_FIELDNODE_TYPE_0100 type = ' + node.type);
expect(node.type === ddm.type.STRING).assertTrue() expect(node.type === ddm.ValueType.STRING).assertTrue();
} catch (e) { } catch (e) {
console.info("SUB_DDM_DKV_FIELDNODE_TYPE_0100 fail on exception: " + e); console.info("SUB_DDM_DKV_FIELDNODE_TYPE_0100 fail on exception: " + e);
expect(null).assertFail();
} }
done(); done();
}) })
...@@ -197,11 +198,12 @@ describe('FieldNodeTest', function() { ...@@ -197,11 +198,12 @@ describe('FieldNodeTest', function() {
it('SUB_DDM_DKV_FIELDNODE_TYPE_0200', 0, async function(done) { it('SUB_DDM_DKV_FIELDNODE_TYPE_0200', 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('SUB_DDM_DKV_FIELDNODE_TYPE_0200 type = ' + node.type);
expect(node.type === ddm.type.INTEGER).assertTrue() expect(node.type === ddm.ValueType.INTEGER).assertTrue();
} catch (e) { } catch (e) {
console.info("SUB_DDM_DKV_FIELDNODE_TYPE_0200 fail on exception: " + e); console.info("SUB_DDM_DKV_FIELDNODE_TYPE_0200 fail on exception: " + e);
expect(null).assertFail();
} }
done(); done();
}) })
...@@ -215,11 +217,12 @@ describe('FieldNodeTest', function() { ...@@ -215,11 +217,12 @@ describe('FieldNodeTest', function() {
it('SUB_DDM_DKV_FIELDNODE_TYPE_0300', 0, async function(done) { it('SUB_DDM_DKV_FIELDNODE_TYPE_0300', 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('SUB_DDM_DKV_FIELDNODE_TYPE_0300 type = ' + node.type);
expect(node.type === ddm.type.FLOAT).assertTrue() expect(node.type === ddm.ValueType.FLOAT).assertTrue();
} catch (e) { } catch (e) {
console.info("SUB_DDM_DKV_FIELDNODE_TYPE_0300 fail on exception: " + e); console.info("SUB_DDM_DKV_FIELDNODE_TYPE_0300 fail on exception: " + e);
expect(null).assertFail();
} }
done(); done();
}) })
...@@ -233,11 +236,12 @@ describe('FieldNodeTest', function() { ...@@ -233,11 +236,12 @@ describe('FieldNodeTest', function() {
it('SUB_DDM_DKV_FIELDNODE_TYPE_0400', 0, async function(done) { it('SUB_DDM_DKV_FIELDNODE_TYPE_0400', 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('SUB_DDM_DKV_FIELDNODE_TYPE_0400 type = ' + node.type);
expect(node.type === ddm.type.BYTE_ARRAY).assertTrue() expect(node.type === ddm.ValueType.BYTE_ARRAY).assertTrue();
} catch (e) { } catch (e) {
console.info("SUB_DDM_DKV_FIELDNODE_TYPE_0400 fail on exception: " + e); console.info("SUB_DDM_DKV_FIELDNODE_TYPE_0400 fail on exception: " + e);
expect(null).assertFail();
} }
done(); done();
}) })
...@@ -251,11 +255,12 @@ describe('FieldNodeTest', function() { ...@@ -251,11 +255,12 @@ describe('FieldNodeTest', function() {
it('SUB_DDM_DKV_FIELDNODE_TYPE_0500', 0, async function(done) { it('SUB_DDM_DKV_FIELDNODE_TYPE_0500', 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('SUB_DDM_DKV_FIELDNODE_TYPE_0500 type = ' + node.type);
expect(node.type === ddm.ValueType.BOOLEAN).assertTrue() expect(node.type === ddm.ValueType.BOOLEAN).assertTrue();
} catch (e) { } catch (e) {
console.info("SUB_DDM_DKV_FIELDNODE_TYPE_0500 fail on exception: " + e); console.info("SUB_DDM_DKV_FIELDNODE_TYPE_0500 fail on exception: " + e);
expect(null).assertFail();
} }
done(); done();
}) })
...@@ -269,11 +274,12 @@ describe('FieldNodeTest', function() { ...@@ -269,11 +274,12 @@ describe('FieldNodeTest', function() {
it('SUB_DDM_DKV_FIELDNODE_TYPE_0600', 0, async function(done) { it('SUB_DDM_DKV_FIELDNODE_TYPE_0600', 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('SUB_DDM_DKV_FIELDNODE_TYPE_0600 type = ' + node.type);
expect(node.type === ddm.type.DOUBLE).assertTrue() expect(node.type === ddm.ValueType.DOUBLE).assertTrue();
} catch (e) { } catch (e) {
console.info("SUB_DDM_DKV_FIELDNODE_TYPE_0600 fail on exception: " + e); console.info("SUB_DDM_DKV_FIELDNODE_TYPE_0600 fail on exception: " + e);
expect(null).assertFail();
} }
done(); done();
}) })
......
...@@ -170,11 +170,12 @@ describe('fieldNodeTest', function() { ...@@ -170,11 +170,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.value.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.info("testtype001 fail on exception: " + e); console.info("testtype001 fail on exception: " + e);
expect(null).assertFail();
} }
done(); done();
}) })
...@@ -187,11 +188,12 @@ describe('fieldNodeTest', function() { ...@@ -187,11 +188,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.info("testtype002 fail on exception: " + e); console.info("testtype002 fail on exception: " + e);
expect(null).assertFail();
} }
done(); done();
}) })
...@@ -204,11 +206,12 @@ describe('fieldNodeTest', function() { ...@@ -204,11 +206,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.info("testtype003 fail on exception: " + e); console.info("testtype003 fail on exception: " + e);
expect(null).assertFail();
} }
done(); done();
}) })
...@@ -221,11 +224,12 @@ describe('fieldNodeTest', function() { ...@@ -221,11 +224,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.info("testtype004 fail on exception: " + e); console.info("testtype004 fail on exception: " + e);
expect(null).assertFail();
} }
done(); done();
}) })
...@@ -238,11 +242,13 @@ describe('fieldNodeTest', function() { ...@@ -238,11 +242,13 @@ 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.info("testtype005 fail on exception: " + e); console.info("testtype005 fail on exception: " + e);
expect(null).assertFail();
} }
done(); done();
}) })
...@@ -255,11 +261,12 @@ describe('fieldNodeTest', function() { ...@@ -255,11 +261,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.info("testtype006 fail on exception: " + e); console.info("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.
先完成此消息的编辑!
想要评论请 注册