blob: 5385e5b4ab75454784272ea5eb28abe89fcb3ad1 (
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
|
// Copyright (C) 2017 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-dataview.prototype.setbigint64
description: >
Throws a TypeError if this does not have a [[DataView]] internal slot
features: [DataView, ArrayBuffer, BigInt]
---*/
var setBigInt64 = DataView.prototype.setBigInt64;
assert.throws(TypeError, function() {
setBigInt64.call({});
}, "{}");
assert.throws(TypeError, function() {
setBigInt64.call([]);
}, "[]");
var ab = new ArrayBuffer(1);
assert.throws(TypeError, function() {
setBigInt64.call(ab);
}, "ArrayBuffer");
var ta = new Int8Array();
assert.throws(TypeError, function() {
setBigInt64.call(ta);
}, "TypedArray");
reportCompare(0, 0);
|