diff options
author | Weijia Wang <381152119@qq.com> | 2018-08-17 16:33:45 +0800 |
---|---|---|
committer | Weijia Wang <starkwang@126.com> | 2018-10-15 19:01:20 +0800 |
commit | ac23e6557f3a9d4283e0d2f0948f871892669faf (patch) | |
tree | a58c76f411402ea6754b177103f23fc6e4dd77f2 /test/parallel/test-buffer-fill.js | |
parent | ea1565e09fbf668e805a648b3dd2a53b71d54946 (diff) | |
download | android-node-v8-ac23e6557f3a9d4283e0d2f0948f871892669faf.tar.gz android-node-v8-ac23e6557f3a9d4283e0d2f0948f871892669faf.tar.bz2 android-node-v8-ac23e6557f3a9d4283e0d2f0948f871892669faf.zip |
buffer: move process.binding('buffer') to internalBinding
PR-URL: https://github.com/nodejs/node/pull/22370
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'test/parallel/test-buffer-fill.js')
-rw-r--r-- | test/parallel/test-buffer-fill.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/parallel/test-buffer-fill.js b/test/parallel/test-buffer-fill.js index 3daaa91d8f..6a0a8adb7a 100644 --- a/test/parallel/test-buffer-fill.js +++ b/test/parallel/test-buffer-fill.js @@ -3,6 +3,7 @@ const common = require('../common'); const assert = require('assert'); const { codes: { ERR_OUT_OF_RANGE } } = require('internal/errors'); +const { internalBinding } = require('internal/test/binding'); const SIZE = 28; const buf1 = Buffer.allocUnsafe(SIZE); @@ -327,7 +328,7 @@ Buffer.alloc(8, ''); // Testing process.binding. Make sure "start" is properly checked for -1 wrap // around. assert.strictEqual( - process.binding('buffer').fill(Buffer.alloc(1), 1, -1, 0, 1), -2); + internalBinding('buffer').fill(Buffer.alloc(1), 1, -1, 0, 1), -2); // Make sure "end" is properly checked, even if it's magically mangled using // Symbol.toPrimitive. @@ -365,7 +366,7 @@ assert.strictEqual( // Testing process.binding. Make sure "end" is properly checked for -1 wrap // around. assert.strictEqual( - process.binding('buffer').fill(Buffer.alloc(1), 1, 1, -2, 1), -2); + internalBinding('buffer').fill(Buffer.alloc(1), 1, 1, -2, 1), -2); // Test that bypassing 'length' won't cause an abort. common.expectsError(() => { |