• Home
  • Raw
  • Download

Lines Matching +full:vm +full:- +full:valgrind +full:- +full:other

5 const vm = require('vm');  constant
19 b[0] = -1;
90 // Try to create 0-length buffers. Should not throw.
107 // Try to write a 0-length string beyond the end of b
111 assert.throws(() => b.write('a', -1), outOfRangeError);
117 assert.throws(() => b.write('a', -1), outOfRangeError);
179 // UTF-8 slice test
219 // Also from a non-pooled instance
259 // Test for proper UTF-8 Encoding
270 ['ucs2', 'ucs-2', 'utf16le', 'utf-16le'].forEach((encoding) => {
296 const f = Buffer.from('\uD83D\uDC4D', 'utf-16le'); // THUMBS UP SIGN (U+1F44D)
324 // Test that regular and URL-safe base64 both work both ways
328 assert.deepStrictEqual(Buffer.from('__--_--_--__', 'base64'),
332 assert.deepStrictEqual(Buffer.from('__--_--_--__', 'base64url'),
339 // Test that regular and URL-safe base64 both work both ways with padding
354 'singular passion from other animals, which is a lust ' +
368 expected.replaceAll('+', '-').replaceAll('/', '_').replaceAll('=', '')
412 // multiple-of-4 with padding
487 // Handle padding graciously, multiple-of-4 or not
493 Buffer.from('72INjkR5fchcxk9-VgdGPFJDxUBFR5_rMFsghgxADiw==', 'base64url')
502 Buffer.from('72INjkR5fchcxk9-VgdGPFJDxUBFR5_rMFsghgxADiw=', 'base64url')
511 Buffer.from('72INjkR5fchcxk9-VgdGPFJDxUBFR5_rMFsghgxADiw', 'base64url')
543 // This string encodes single '.' character in UTF-16
553 // This string encodes single '.' character in UTF-16
722 ['ucs2', 'ucs-2', 'utf16le', 'utf-16le'].forEach((encoding) => {
728 ['ucs2', 'ucs-2', 'utf16le', 'utf-16le'].forEach((encoding) => {
769 // https://github.com/nodejs/node-v0.x-archive/pull/1210
770 // Test UTF-8 string includes null character
794 // https://github.com/nodejs/node-v0.x-archive/issues/243
825 ['ucs2', 'ucs-2', 'utf16le', 'utf-16le'].forEach((encoding) => {
847 // ef bf bd = utf-8 representation of unicode replacement character
883 // Call .fill() first, stops valgrind warning about uninitialized memory reads.
908 // issue GH-3416
911 // issue GH-5587
933 () => Buffer.allocUnsafe(8).writeFloatLE(0.0, -1),
937 () => Buffer.allocUnsafe(8).writeFloatLE(0.0, -1),
964 buf.writeIntLE(-0x123456, 0, 3);
966 assert.strictEqual(buf.readIntLE(0, 3), -0x123456);
969 buf.writeIntBE(-0x123456, 0, 3);
971 assert.strictEqual(buf.readIntBE(0, 3), -0x123456);
974 buf.writeIntLE(-0x123400, 0, 3);
976 assert.strictEqual(buf.readIntLE(0, 3), -0x123400);
979 buf.writeIntBE(-0x123400, 0, 3);
981 assert.strictEqual(buf.readIntBE(0, 3), -0x123400);
984 buf.writeIntLE(-0x120000, 0, 3);
986 assert.strictEqual(buf.readIntLE(0, 3), -0x120000);
989 buf.writeIntBE(-0x120000, 0, 3);
991 assert.strictEqual(buf.readIntBE(0, 3), -0x120000);
1014 buf.writeIntLE(-0x1234567890, 0, 5);
1016 assert.strictEqual(buf.readIntLE(0, 5), -0x1234567890);
1019 buf.writeIntBE(-0x1234567890, 0, 5);
1021 assert.strictEqual(buf.readIntBE(0, 5), -0x1234567890);
1024 buf.writeIntLE(-0x0012000000, 0, 5);
1026 assert.strictEqual(buf.readIntLE(0, 5), -0x0012000000);
1029 buf.writeIntBE(-0x0012000000, 0, 5);
1031 assert.strictEqual(buf.readIntBE(0, 5), -0x0012000000);
1034 // Regression test for https://github.com/nodejs/node-v0.x-archive/issues/5482:
1045 // Regression test for https://github.com/nodejs/node-v0.x-archive/issues/6111.
1061 if (common.hasCrypto) { // eslint-disable-line node-core/crypto-check
1093 'Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined'
1098 'Buffer, ArrayBuffer, or Array or an Array-like Object. Received null'
1112 assert.deepStrictEqual(Buffer.from({ length: -Buffer.poolSize }),
1114 assert.deepStrictEqual(Buffer.from({ length: -100 }),
1129 assert.throws(() => Buffer.from(new ArrayBuffer(0), -1 >>> 0), errMsg);
1151 const arrayBuf = vm.runInNewContext('new ArrayBuffer()');
1157 assert.throws(() => Buffer.alloc({ valueOf: () => -1 }),