blob: d74e02736a8ebab12ceb31f15b072f90621009fd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 22.2.4.1
description: >
Throws a TypeError if NewTarget is undefined.
info: >
TypedArray( ... argumentsList)
1. If NewTarget is undefined, throw a TypeError exception.
---*/
assert.throws(TypeError, function() {
Uint32Array();
}, "Uint32Array()");
assert.throws(TypeError, function() {
Uint32Array(0);
}, "Uint32Array(0)");
assert.throws(TypeError, function() {
Uint32Array(new Uint32Array(1));
}, "Uint32Array(uint32Array)");
assert.throws(TypeError, function() {
Uint32Array([]);
}, "Uint32Array(array)");
assert.throws(TypeError, function() {
Uint32Array(new ArrayBuffer(8));
}, "Uint32Array(arrayBuffer)");
|