node-opcua-variant
Advanced tools
Comparing version 0.1.0-4 to 0.1.0-5
{ | ||
"name": "node-opcua-variant", | ||
"version": "0.1.0-4", | ||
"version": "0.1.0-5", | ||
"description": "pure nodejs OPCUA SDK - module -variant", | ||
@@ -13,6 +13,6 @@ "main": "index.js", | ||
"node-opcua-assert": "^0.1.0-4", | ||
"node-opcua-basic-types": "^0.1.0-4", | ||
"node-opcua-data-model": "^0.1.0-4", | ||
"node-opcua-factory": "^0.1.0-4", | ||
"node-opcua-nodeid": "^0.1.0-4", | ||
"node-opcua-basic-types": "^0.1.0-5", | ||
"node-opcua-data-model": "^0.1.0-5", | ||
"node-opcua-factory": "^0.1.0-5", | ||
"node-opcua-nodeid": "^0.1.0-5", | ||
"node-opcua-utils": "^0.1.0-4", | ||
@@ -25,5 +25,5 @@ "underscore": "^1.8.3" | ||
"node-opcua-debug": "^0.1.0-4", | ||
"node-opcua-generator": "^0.1.0-4", | ||
"node-opcua-numeric-range": "^0.1.0-4", | ||
"node-opcua-packet-analyzer": "^0.1.0-4", | ||
"node-opcua-generator": "^0.1.0-5", | ||
"node-opcua-numeric-range": "^0.1.0-5", | ||
"node-opcua-packet-analyzer": "^0.1.0-5", | ||
"node-opcua-status-code": "^0.1.0-4", | ||
@@ -30,0 +30,0 @@ "should": "^13.0.1" |
@@ -61,3 +61,8 @@ "use strict"; | ||
var1.arrayType.should.eql(VariantArrayType.Scalar); | ||
var1.value.should.be.instanceof(Array); | ||
var1.value.length.should.equal(2); | ||
var1.value[0].should.eql(10); // high | ||
var1.value[1].should.eql(20); // low | ||
encode_decode_round_trip_test(var1, function (stream) { | ||
@@ -67,3 +72,24 @@ stream.length.should.equal(9); | ||
}); | ||
it("should create a Scalar UInt64 Variant - version 2 (passing a number that will be coerced to UInt64)", function () { | ||
var var1 = new Variant({ | ||
arrayType: VariantArrayType.Scalar, | ||
dataType: DataType.UInt64, | ||
// HHHHHHHHLLLLLLLL | ||
value: 0x100020000000 | ||
}); | ||
var1.dataType.should.eql(DataType.UInt64); | ||
var1.arrayType.should.eql(VariantArrayType.Scalar); | ||
var1.value.should.be.instanceof(Array); | ||
var1.value.length.should.equal(2); | ||
var1.value[0].should.eql(0x1000); // high | ||
var1.value[1].should.eql(0x20000000); // low | ||
encode_decode_round_trip_test(var1, function (stream) { | ||
stream.length.should.equal(9); | ||
}); | ||
}); | ||
it("should create a Scalar LocalizedText Variant 1/2", function () { | ||
@@ -70,0 +96,0 @@ var var1 = new Variant({ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
93730
2211