1 | 'use strict';
|
2 |
|
3 | var global = require('../internals/global');
|
4 | var fails = require('../internals/fails');
|
5 | var checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');
|
6 | var NATIVE_ARRAY_BUFFER_VIEWS = require('../internals/array-buffer-view-core').NATIVE_ARRAY_BUFFER_VIEWS;
|
7 |
|
8 | var ArrayBuffer = global.ArrayBuffer;
|
9 | var Int8Array = global.Int8Array;
|
10 |
|
11 | module.exports = !NATIVE_ARRAY_BUFFER_VIEWS || !fails(function () {
|
12 | Int8Array(1);
|
13 | }) || !fails(function () {
|
14 | new Int8Array(-1);
|
15 | }) || !checkCorrectnessOfIteration(function (iterable) {
|
16 | new Int8Array();
|
17 | new Int8Array(null);
|
18 | new Int8Array(1.5);
|
19 | new Int8Array(iterable);
|
20 | }, true) || fails(function () {
|
21 |
|
22 | return new Int8Array(new ArrayBuffer(2), 1, undefined).length !== 1;
|
23 | });
|