Exemple #1
0
		it('should return the size of a binary field in bytes', function () {
			assert.equal(8, types.buffer.size(expected));
		});
Exemple #2
0
		it('should write a binary field to the buffer', function () {
			const	b2	= new Buffer(8);
			types.buffer.write(expected, b2, 0);
			assert.deepEqual(b, b2);
		});
Exemple #3
0
		it('should read a binary field from the buffer', function () {
			const	result	= types.buffer.read(b, 0, b.length);
			assert.deepEqual(result, expected);
		});