Comparing version 0.1.3 to 0.1.4
@@ -159,2 +159,9 @@ /* | ||
function buffer_ops_be(name) { | ||
return { | ||
'read': function (buffer, offset) { return buffer['read' + name + 'BE'](offset); }, | ||
'write': function (buffer, value, offset) { buffer['write' + name + 'BE'](value, offset); } | ||
}; | ||
} | ||
var MAX_UINT = 4294967296; // 2^32 | ||
@@ -231,4 +238,4 @@ function write_ulong(buffer, value, offset) { | ||
define_type('SmallLong', 0x55, buffer_ops('Int8')); | ||
define_type('Float', 0x72, buffer_ops('Float')); | ||
define_type('Double', 0x82, buffer_ops('Double')); | ||
define_type('Float', 0x72, buffer_ops_be('Float')); | ||
define_type('Double', 0x82, buffer_ops_be('Double')); | ||
define_type('Decimal32', 0x74); | ||
@@ -235,0 +242,0 @@ define_type('Decimal64', 0x84); |
{ | ||
"name" : "rhea", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "reactive AMQP 1.0 library", | ||
@@ -5,0 +5,0 @@ "homepage": "http://github.com/grs/rhea", |
@@ -64,2 +64,5 @@ /* | ||
})); | ||
it('sends and receives float property', transfer_test({application_properties:{pi:3.14}}, function(message) { | ||
assert.equal(message.application_properties.pi, 3.14); | ||
})); | ||
it('sends and receives string message annotation', transfer_test({message_annotations:{colour:'blue'}}, function(message) { | ||
@@ -87,2 +90,14 @@ assert.equal(message.message_annotations.colour, 'blue'); | ||
})); | ||
it('sends and receives map with doubles', transfer_test({body:{west:amqp_types.wrap_double(4.734), north:amqp_types.wrap_double(56.0023), | ||
}}, function(message) { | ||
assert.equal(message.body.north, 56.0023); | ||
assert.equal(message.body.west, 4.734); | ||
})); | ||
it('sends and receives map with floats', transfer_test({body:{half:amqp_types.wrap_float(0.5), quarter:amqp_types.wrap_double(0.25), | ||
}}, function(message) { | ||
assert.equal(message.body.half, 0.5); | ||
assert.equal(message.body.quarter, 0.25); | ||
})); | ||
it('sends and receives map with ulongs', transfer_test({body:{age:amqp_types.wrap_ulong(888), max:amqp_types.wrap_ulong(9007199254740992), | ||
@@ -89,0 +104,0 @@ }}, function(message) { |
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
307244
6550