Example #1
0
		it('should return the length of a C-Octet String (null-terminated string)', function () {
			assert.equal(9, types.cstring.size(expected));
		});
Example #2
0
		it('should write a C-Octet String (null-terminated string) to the buffer', function () {
			const	b2	= new Buffer(9);
			types.cstring.write(expected, b2, 0);
			assert.deepEqual(b,	b2);
		});
Example #3
0
		it('should read a C-Octet String (null-terminated string) from the buffer', function () {
			const	result	= types.cstring.read(b, 0);
			assert.equal(result, expected);
		});