summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/TypedArrayConstructors/Float32Array/prototype
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /js/src/tests/test262/built-ins/TypedArrayConstructors/Float32Array/prototype
parentInitial commit. (diff)
downloadfirefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz
firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/tests/test262/built-ins/TypedArrayConstructors/Float32Array/prototype')
-rw-r--r--js/src/tests/test262/built-ins/TypedArrayConstructors/Float32Array/prototype/BYTES_PER_ELEMENT.js23
-rw-r--r--js/src/tests/test262/built-ins/TypedArrayConstructors/Float32Array/prototype/browser.js0
-rw-r--r--js/src/tests/test262/built-ins/TypedArrayConstructors/Float32Array/prototype/constructor.js26
-rw-r--r--js/src/tests/test262/built-ins/TypedArrayConstructors/Float32Array/prototype/not-typedarray-object.js19
-rw-r--r--js/src/tests/test262/built-ins/TypedArrayConstructors/Float32Array/prototype/proto.js17
-rw-r--r--js/src/tests/test262/built-ins/TypedArrayConstructors/Float32Array/prototype/shell.js0
6 files changed, 85 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/Float32Array/prototype/BYTES_PER_ELEMENT.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/Float32Array/prototype/BYTES_PER_ELEMENT.js
new file mode 100644
index 0000000000..716cb5b7b7
--- /dev/null
+++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/Float32Array/prototype/BYTES_PER_ELEMENT.js
@@ -0,0 +1,23 @@
+// Copyright (C) 2015 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-typedarray.prototype.bytes_per_element
+description: >
+ The initial value of Float32Array.prototype.BYTES_PER_ELEMENT is 4.
+info: |
+ The value of TypedArray.prototype.BYTES_PER_ELEMENT is the Number value
+ of the Element Size value specified in Table 49 for TypedArray.
+
+ This property has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }.
+includes: [propertyHelper.js]
+features: [TypedArray]
+---*/
+
+assert.sameValue(Float32Array.prototype.BYTES_PER_ELEMENT, 4);
+
+verifyNotEnumerable(Float32Array.prototype, "BYTES_PER_ELEMENT");
+verifyNotWritable(Float32Array.prototype, "BYTES_PER_ELEMENT");
+verifyNotConfigurable(Float32Array.prototype, "BYTES_PER_ELEMENT");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/Float32Array/prototype/browser.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/Float32Array/prototype/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/Float32Array/prototype/browser.js
diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/Float32Array/prototype/constructor.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/Float32Array/prototype/constructor.js
new file mode 100644
index 0000000000..0e8900d4fa
--- /dev/null
+++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/Float32Array/prototype/constructor.js
@@ -0,0 +1,26 @@
+// Copyright (C) 2015 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-typedarray.prototype.constructor
+description: >
+ The initial value of Float32Array.prototype.constructor is the Float32Array object.
+info: |
+ The initial value of Float32Array.prototype.constructor is the intrinsic
+ object %Float32Array%.
+
+ 17 ECMAScript Standard Built-in Objects:
+ Every other data property described in clauses 18 through 26 and in Annex B.2 has
+ the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
+ unless otherwise specified.
+includes: [propertyHelper.js]
+features: [TypedArray]
+---*/
+
+assert.sameValue(Float32Array.prototype.constructor, Float32Array);
+
+verifyNotEnumerable(Float32Array.prototype, "constructor");
+verifyWritable(Float32Array.prototype, "constructor");
+verifyConfigurable(Float32Array.prototype, "constructor");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/Float32Array/prototype/not-typedarray-object.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/Float32Array/prototype/not-typedarray-object.js
new file mode 100644
index 0000000000..2c13bccf65
--- /dev/null
+++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/Float32Array/prototype/not-typedarray-object.js
@@ -0,0 +1,19 @@
+// Copyright (C) 2015 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-properties-of-typedarray-prototype-objects
+description: >
+ Float64Array.prototype is not a TypedArray instance object.
+info: |
+ A TypedArray prototype object is an ordinary object. It does not have
+ a [[ViewedArrayBuffer]] or any other of the internal slots that are
+ specific to TypedArray instance objects.
+features: [TypedArray]
+---*/
+
+assert.throws(TypeError, function() {
+ Float64Array.prototype.buffer;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/Float32Array/prototype/proto.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/Float32Array/prototype/proto.js
new file mode 100644
index 0000000000..1db64d3074
--- /dev/null
+++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/Float32Array/prototype/proto.js
@@ -0,0 +1,17 @@
+// Copyright (C) 2015 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-properties-of-typedarray-prototype-objects
+description: >
+ The prototype of Float32Array.prototype is %TypedArrayPrototype%.
+info: |
+ The value of the [[Prototype]] internal slot of a TypedArray prototype
+ object is the intrinsic object %TypedArrayPrototype% (22.2.3).
+includes: [testTypedArray.js]
+features: [TypedArray]
+---*/
+
+assert.sameValue(Object.getPrototypeOf(Float32Array.prototype), TypedArray.prototype);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/TypedArrayConstructors/Float32Array/prototype/shell.js b/js/src/tests/test262/built-ins/TypedArrayConstructors/Float32Array/prototype/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/TypedArrayConstructors/Float32Array/prototype/shell.js