Backed out 2 changesets (bug 1888310, bug 1884625) for causing failures on browser_ap...
[gecko.git] / js / src / tests / test262 / built-ins / DataView / prototype / setFloat16 / this-has-no-dataview-internal.js
blob66bc7a8ee668592ef4bd64c925a1b0f07680c5d2
1 // |reftest| skip -- Float16Array is not supported
2 // Copyright (C) 2024 Kevin Gibbons. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
5 /*---
6 esid: sec-dataview.prototype.setfloat16
7 description: >
8   Throws a TypeError if this does not have a [[DataView]] internal slot
9 features: [Float16Array, Int8Array]
10 ---*/
12 var setFloat16 = DataView.prototype.setFloat16;
14 assert.throws(TypeError, function() {
15   setFloat16.call({});
16 }, "{}");
18 assert.throws(TypeError, function() {
19   setFloat16.call([]);
20 }, "[]");
22 var ab = new ArrayBuffer(1);
23 assert.throws(TypeError, function() {
24   setFloat16.call(ab);
25 }, "ArrayBuffer");
27 var ta = new Int8Array();
28 assert.throws(TypeError, function() {
29   setFloat16.call(ta);
30 }, "TypedArray");
32 reportCompare(0, 0);