node/test/pummel/test-buffer-big.js
isaacs 3e1b1dd4a9 Remove excessive copyright/license boilerplate
The copyright and license notice is already in the LICENSE file.  There
is no justifiable reason to also require that it be included in every
file, since the individual files are not individually distributed except
as part of the entire package.
2015-01-12 15:30:28 -08:00

8 lines
428 B
JavaScript

var common = require('../common');
var assert = require('assert');
// The tests below should throw an error, not abort the process...
assert.throws(function() { new Buffer(0x3fffffff + 1) }, RangeError);
assert.throws(function() { new Int8Array(0x3fffffff + 1) }, RangeError);
assert.throws(function() { new ArrayBuffer(0x3fffffff + 1) }, RangeError);
assert.throws(function() { new Float64Array(0x7ffffff + 1) }, RangeError);