diff --git a/distributeddatamgr/distributeddatamgrjstest/hap/src/main/js/default/test/FieldNodeJsunit.test.js b/distributeddatamgr/distributeddatamgrjstest/hap/src/main/js/default/test/FieldNodeJsunit.test.js index 014702602e525126f816ef982c00a1367ee503b1..bc614081af17a85481f70a59aa6935e86dd65be1 100644 --- a/distributeddatamgr/distributeddatamgrjstest/hap/src/main/js/default/test/FieldNodeJsunit.test.js +++ b/distributeddatamgr/distributeddatamgrjstest/hap/src/main/js/default/test/FieldNodeJsunit.test.js @@ -168,11 +168,12 @@ describe('FieldNodeTest', function() { it('testtype001', 0, async function(done) { try { let node = new ddm.FieldNode('first'); - node.type = ddm.type.STRING; - console.info('type = ' + node.type); - expect(node.type === ddm.type.STRING).assertTrue() + node.type = ddm.ValueType.STRING; + console.info('testtype001 type = ' + node.type); + expect(node.type === ddm.ValueType.STRING).assertTrue(); } catch (e) { console.log("testtype001 fail on exception: " + e); + expect(null).assertFail(); } done(); }) @@ -185,11 +186,12 @@ describe('FieldNodeTest', function() { it('testtype002', 0, async function(done) { try { let node = new ddm.FieldNode('first'); - node.type = ddm.type.INTEGER; - console.info('type = ' + node.type); - expect(node.type === ddm.type.INTEGER).assertTrue() + node.type = ddm.ValueType.INTEGER; + console.info('testtype002 type = ' + node.type); + expect(node.type === ddm.ValueType.INTEGER).assertTrue(); } catch (e) { console.log("testtype002 fail on exception: " + e); + expect(null).assertFail(); } done(); }) @@ -202,11 +204,12 @@ describe('FieldNodeTest', function() { it('testtype003', 0, async function(done) { try { let node = new ddm.FieldNode('first'); - node.type = ddm.type.FLOAT; - console.info('type = ' + node.type); - expect(node.type === ddm.type.FLOAT).assertTrue() + node.type = ddm.ValueType.FLOAT; + console.info('testtype003 type = ' + node.type); + expect(node.type === ddm.ValueType.FLOAT).assertTrue(); } catch (e) { console.log("testtype003 fail on exception: " + e); + expect(null).assertFail(); } done(); }) @@ -219,11 +222,12 @@ describe('FieldNodeTest', function() { it('testtype004', 0, async function(done) { try { let node = new ddm.FieldNode('first'); - node.type = ddm.type.BYTE_ARRAY; - console.info('type = ' + node.type); - expect(node.type === ddm.type.BYTE_ARRAY).assertTrue() + node.type = ddm.ValueType.BYTE_ARRAY; + console.info('testtype004 type = ' + node.type); + expect(node.type === ddm.ValueType.BYTE_ARRAY).assertTrue(); } catch (e) { console.log("testtype004 fail on exception: " + e); + expect(null).assertFail(); } done(); }) @@ -236,11 +240,12 @@ describe('FieldNodeTest', function() { it('testtype005', 0, async function(done) { try { let node = new ddm.FieldNode('first'); - node.type = ddm.type.BOOLEAN; - console.info('type = ' + node.type); - expect(node.type === ddm.ValueType.BOOLEAN).assertTrue() + node.type = ddm.ValueType.BOOLEAN; + console.info('testtype005 type = ' + node.type); + expect(node.type === ddm.ValueType.BOOLEAN).assertTrue(); } catch (e) { console.log("testtype005 fail on exception: " + e); + expect(null).assertFail(); } done(); }) @@ -253,11 +258,12 @@ describe('FieldNodeTest', function() { it('testtype006', 0, async function(done) { try { let node = new ddm.FieldNode('first'); - node.type = ddm.type.DOUBLE; - console.info('type = ' + node.type); - expect(node.type === ddm.type.DOUBLE).assertTrue() + node.type = ddm.ValueType.DOUBLE; + console.info('testtype006 type = ' + node.type); + expect(node.type === ddm.ValueType.DOUBLE).assertTrue(); } catch (e) { console.log("testtype006 fail on exception: " + e); + expect(null).assertFail(); } done(); })