summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/intl402/DurationFormat/prototype/resolvedOptions
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /js/src/tests/test262/intl402/DurationFormat/prototype/resolvedOptions
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/tests/test262/intl402/DurationFormat/prototype/resolvedOptions')
-rw-r--r--js/src/tests/test262/intl402/DurationFormat/prototype/resolvedOptions/browser.js0
-rw-r--r--js/src/tests/test262/intl402/DurationFormat/prototype/resolvedOptions/length.js39
-rw-r--r--js/src/tests/test262/intl402/DurationFormat/prototype/resolvedOptions/name.js29
-rw-r--r--js/src/tests/test262/intl402/DurationFormat/prototype/resolvedOptions/prop-desc.js24
-rw-r--r--js/src/tests/test262/intl402/DurationFormat/prototype/resolvedOptions/shell.js0
-rw-r--r--js/src/tests/test262/intl402/DurationFormat/prototype/resolvedOptions/throw-invoked-as-func.js24
6 files changed, 116 insertions, 0 deletions
diff --git a/js/src/tests/test262/intl402/DurationFormat/prototype/resolvedOptions/browser.js b/js/src/tests/test262/intl402/DurationFormat/prototype/resolvedOptions/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/intl402/DurationFormat/prototype/resolvedOptions/browser.js
diff --git a/js/src/tests/test262/intl402/DurationFormat/prototype/resolvedOptions/length.js b/js/src/tests/test262/intl402/DurationFormat/prototype/resolvedOptions/length.js
new file mode 100644
index 0000000000..f59ec0500f
--- /dev/null
+++ b/js/src/tests/test262/intl402/DurationFormat/prototype/resolvedOptions/length.js
@@ -0,0 +1,39 @@
+// |reftest| skip -- Intl.DurationFormat is not supported
+// Copyright 2022 Igalia, S.L. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-intl.DurationFormat.prototype.resolvedoptions
+description: >
+ Intl.DurationFormat.prototype.resolvedOptions.length is 0.
+info: |
+ Intl.DurationFormat.prototype.resolvedOptions ()
+
+ 17 ECMAScript Standard Built-in Objects:
+
+ Every built-in function object, including constructors, has a length
+ property whose value is an integer. Unless otherwise specified, this
+ value is equal to the largest number of named arguments shown in the
+ subclause headings for the function description. Optional parameters
+ (which are indicated with brackets: [ ]) or rest parameters (which
+ are shown using the form «...name») are not included in the default
+ argument count.
+ Unless otherwise specified, the length property of a built-in function
+ object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
+ [[Configurable]]: true }.
+
+features: [Intl.DurationFormat]
+includes: [propertyHelper.js]
+---*/
+
+assert.sameValue(Intl.DurationFormat.prototype.resolvedOptions.length, 0);
+
+verifyProperty(Intl.DurationFormat.prototype.resolvedOptions, "length", {
+ value: 0,
+ writable: false,
+ enumerable: false,
+ configurable: true
+});
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/intl402/DurationFormat/prototype/resolvedOptions/name.js b/js/src/tests/test262/intl402/DurationFormat/prototype/resolvedOptions/name.js
new file mode 100644
index 0000000000..dbab5aaa2b
--- /dev/null
+++ b/js/src/tests/test262/intl402/DurationFormat/prototype/resolvedOptions/name.js
@@ -0,0 +1,29 @@
+// |reftest| skip -- Intl.DurationFormat is not supported
+// Copyright 2022 Igalia, S.L. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-Intl.DurationFormat.prototype.resolvedOptions
+description: Checks the "name" property of Intl.DurationFormat.prototype.resolvedOptions().
+info: |
+ 17 ECMAScript Standard Built-in Objects:
+ Every built-in Function object, including constructors, that is not
+ identified as an anonymous function has a name property whose value
+ is a String.
+
+ Unless otherwise specified, the name property of a built-in Function
+ object, if it exists, has the attributes { [[Writable]]: false,
+ [[Enumerable]]: false, [[Configurable]]: true }.
+
+includes: [propertyHelper.js]
+features: [Intl.DurationFormat]
+---*/
+
+verifyProperty(Intl.DurationFormat.prototype.resolvedOptions, "name", {
+ value: "resolvedOptions",
+ writable: false,
+ enumerable: false,
+ configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/intl402/DurationFormat/prototype/resolvedOptions/prop-desc.js b/js/src/tests/test262/intl402/DurationFormat/prototype/resolvedOptions/prop-desc.js
new file mode 100644
index 0000000000..1b667908c4
--- /dev/null
+++ b/js/src/tests/test262/intl402/DurationFormat/prototype/resolvedOptions/prop-desc.js
@@ -0,0 +1,24 @@
+// |reftest| skip -- Intl.DurationFormat is not supported
+// Copyright (C) 2022 Igalia, S.L. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-Intl.DurationFormat.prototype.resolvedOptions
+description: Property descriptor of Intl.DurationFormat.prototype.resolvedOptions
+includes: [propertyHelper.js]
+features: [Intl.DurationFormat]
+---*/
+
+assert.sameValue(
+ typeof Intl.DurationFormat.prototype.resolvedOptions,
+ 'function',
+ '`typeof Intl.DurationFormat.prototype.resolvedOptions` is `function`'
+);
+
+verifyProperty(Intl.DurationFormat.prototype, 'resolvedOptions', {
+ enumerable: false,
+ writable: true,
+ configurable: true,
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/intl402/DurationFormat/prototype/resolvedOptions/shell.js b/js/src/tests/test262/intl402/DurationFormat/prototype/resolvedOptions/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/intl402/DurationFormat/prototype/resolvedOptions/shell.js
diff --git a/js/src/tests/test262/intl402/DurationFormat/prototype/resolvedOptions/throw-invoked-as-func.js b/js/src/tests/test262/intl402/DurationFormat/prototype/resolvedOptions/throw-invoked-as-func.js
new file mode 100644
index 0000000000..a75c9f2bb4
--- /dev/null
+++ b/js/src/tests/test262/intl402/DurationFormat/prototype/resolvedOptions/throw-invoked-as-func.js
@@ -0,0 +1,24 @@
+// |reftest| skip -- Intl.DurationFormat is not supported
+// Copyright (C) 2022 Igalia, S.L. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-intl.DurationFormat.prototype.resolvedOptions
+description: basic tests internal slot initialization and call receiver errors
+info: |
+ Intl.DurationFormat.prototype.resolvedOptions ( )
+ (...)
+ 2. Perform ? RequireInternalSlot(df, [[InitializedDurationFormat]]).
+features: [Intl.DurationFormat]
+---*/
+
+const df = new Intl.DurationFormat();
+
+// Perform ? RequireInternalSlot(df, [[InitializedDurationFormat]]).
+let f = df['resolvedOptions'];
+
+assert.sameValue(typeof f, 'function');
+assert.throws(TypeError, () => { f() });
+
+
+reportCompare(0, 0);