summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Function/prototype
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/built-ins/Function/prototype')
-rw-r--r--js/src/tests/test262/built-ins/Function/prototype/Symbol.hasInstance/length.js11
-rw-r--r--js/src/tests/test262/built-ins/Function/prototype/Symbol.hasInstance/name.js13
-rw-r--r--js/src/tests/test262/built-ins/Function/prototype/apply/name.js11
-rw-r--r--js/src/tests/test262/built-ins/Function/prototype/apply/not-a-constructor.js4
-rw-r--r--js/src/tests/test262/built-ins/Function/prototype/bind/name.js11
-rw-r--r--js/src/tests/test262/built-ins/Function/prototype/bind/not-a-constructor.js2
-rw-r--r--js/src/tests/test262/built-ins/Function/prototype/call/name.js11
-rw-r--r--js/src/tests/test262/built-ins/Function/prototype/call/not-a-constructor.js4
-rw-r--r--js/src/tests/test262/built-ins/Function/prototype/name.js10
-rw-r--r--js/src/tests/test262/built-ins/Function/prototype/toString/name.js11
-rw-r--r--js/src/tests/test262/built-ins/Function/prototype/toString/not-a-constructor.js4
11 files changed, 49 insertions, 43 deletions
diff --git a/js/src/tests/test262/built-ins/Function/prototype/Symbol.hasInstance/length.js b/js/src/tests/test262/built-ins/Function/prototype/Symbol.hasInstance/length.js
index 7a482b0d73..dff2e7bb58 100644
--- a/js/src/tests/test262/built-ins/Function/prototype/Symbol.hasInstance/length.js
+++ b/js/src/tests/test262/built-ins/Function/prototype/Symbol.hasInstance/length.js
@@ -19,10 +19,11 @@ features: [Symbol.hasInstance]
includes: [propertyHelper.js]
---*/
-assert.sameValue(Function.prototype[Symbol.hasInstance].length, 1);
-
-verifyNotEnumerable(Function.prototype[Symbol.hasInstance], 'length');
-verifyNotWritable(Function.prototype[Symbol.hasInstance], 'length');
-verifyConfigurable(Function.prototype[Symbol.hasInstance], 'length');
+verifyProperty(Function.prototype[Symbol.hasInstance], "length", {
+ value: 1,
+ writable: false,
+ enumerable: false,
+ configurable: true
+});
reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Function/prototype/Symbol.hasInstance/name.js b/js/src/tests/test262/built-ins/Function/prototype/Symbol.hasInstance/name.js
index 13f5f41f9f..72ba2d6b34 100644
--- a/js/src/tests/test262/built-ins/Function/prototype/Symbol.hasInstance/name.js
+++ b/js/src/tests/test262/built-ins/Function/prototype/Symbol.hasInstance/name.js
@@ -10,12 +10,11 @@ features: [Symbol.hasInstance]
includes: [propertyHelper.js]
---*/
-assert.sameValue(
- Function.prototype[Symbol.hasInstance].name, '[Symbol.hasInstance]'
-);
-
-verifyNotEnumerable(Function.prototype[Symbol.hasInstance], 'name');
-verifyNotWritable(Function.prototype[Symbol.hasInstance], 'name');
-verifyConfigurable(Function.prototype[Symbol.hasInstance], 'name');
+verifyProperty(Function.prototype[Symbol.hasInstance], "name", {
+ value: "[Symbol.hasInstance]",
+ writable: false,
+ enumerable: false,
+ configurable: true
+});
reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Function/prototype/apply/name.js b/js/src/tests/test262/built-ins/Function/prototype/apply/name.js
index 528cf8f58a..f12cde6de0 100644
--- a/js/src/tests/test262/built-ins/Function/prototype/apply/name.js
+++ b/js/src/tests/test262/built-ins/Function/prototype/apply/name.js
@@ -19,10 +19,11 @@ info: |
includes: [propertyHelper.js]
---*/
-assert.sameValue(Function.prototype.apply.name, "apply");
-
-verifyNotEnumerable(Function.prototype.apply, "name");
-verifyNotWritable(Function.prototype.apply, "name");
-verifyConfigurable(Function.prototype.apply, "name");
+verifyProperty(Function.prototype.apply, "name", {
+ value: "apply",
+ writable: false,
+ enumerable: false,
+ configurable: true
+});
reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Function/prototype/apply/not-a-constructor.js b/js/src/tests/test262/built-ins/Function/prototype/apply/not-a-constructor.js
index 43275e54f0..8adbf6bce4 100644
--- a/js/src/tests/test262/built-ins/Function/prototype/apply/not-a-constructor.js
+++ b/js/src/tests/test262/built-ins/Function/prototype/apply/not-a-constructor.js
@@ -29,10 +29,10 @@ assert.sameValue(
assert.throws(TypeError, () => {
new Function.prototype.apply;
-}, '`new Function.prototype.apply` throws TypeError');
+});
assert.throws(TypeError, () => {
new Function.prototype.apply();
-}, '`new Function.prototype.apply()` throws TypeError');
+});
reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Function/prototype/bind/name.js b/js/src/tests/test262/built-ins/Function/prototype/bind/name.js
index d9f70e68a4..634d4d95a7 100644
--- a/js/src/tests/test262/built-ins/Function/prototype/bind/name.js
+++ b/js/src/tests/test262/built-ins/Function/prototype/bind/name.js
@@ -19,10 +19,11 @@ info: |
includes: [propertyHelper.js]
---*/
-assert.sameValue(Function.prototype.bind.name, "bind");
-
-verifyNotEnumerable(Function.prototype.bind, "name");
-verifyNotWritable(Function.prototype.bind, "name");
-verifyConfigurable(Function.prototype.bind, "name");
+verifyProperty(Function.prototype.bind, "name", {
+ value: "bind",
+ writable: false,
+ enumerable: false,
+ configurable: true
+});
reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Function/prototype/bind/not-a-constructor.js b/js/src/tests/test262/built-ins/Function/prototype/bind/not-a-constructor.js
index 22f63d1ade..556e2e474a 100644
--- a/js/src/tests/test262/built-ins/Function/prototype/bind/not-a-constructor.js
+++ b/js/src/tests/test262/built-ins/Function/prototype/bind/not-a-constructor.js
@@ -29,7 +29,7 @@ assert.sameValue(
assert.throws(TypeError, () => {
new Function.prototype.bind();
-}, '`new Function.prototype.bind()` throws TypeError');
+});
reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Function/prototype/call/name.js b/js/src/tests/test262/built-ins/Function/prototype/call/name.js
index d919573ff9..7f121d7235 100644
--- a/js/src/tests/test262/built-ins/Function/prototype/call/name.js
+++ b/js/src/tests/test262/built-ins/Function/prototype/call/name.js
@@ -19,10 +19,11 @@ info: |
includes: [propertyHelper.js]
---*/
-assert.sameValue(Function.prototype.call.name, "call");
-
-verifyNotEnumerable(Function.prototype.call, "name");
-verifyNotWritable(Function.prototype.call, "name");
-verifyConfigurable(Function.prototype.call, "name");
+verifyProperty(Function.prototype.call, "name", {
+ value: "call",
+ writable: false,
+ enumerable: false,
+ configurable: true
+});
reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Function/prototype/call/not-a-constructor.js b/js/src/tests/test262/built-ins/Function/prototype/call/not-a-constructor.js
index 1ae179235e..7e90f7fee7 100644
--- a/js/src/tests/test262/built-ins/Function/prototype/call/not-a-constructor.js
+++ b/js/src/tests/test262/built-ins/Function/prototype/call/not-a-constructor.js
@@ -29,11 +29,11 @@ assert.sameValue(
assert.throws(TypeError, () => {
new Function.prototype.call();
-}, '`new Function.prototype.call()` throws TypeError');
+});
assert.throws(TypeError, () => {
new Function.prototype.call;
-}, '`new Function.prototype.call` throws TypeError');
+});
var call = Function.prototype.call;
assert.throws(TypeError, () => {
diff --git a/js/src/tests/test262/built-ins/Function/prototype/name.js b/js/src/tests/test262/built-ins/Function/prototype/name.js
index 653145db42..0a0d150fe7 100644
--- a/js/src/tests/test262/built-ins/Function/prototype/name.js
+++ b/js/src/tests/test262/built-ins/Function/prototype/name.js
@@ -16,9 +16,11 @@ info: |
includes: [propertyHelper.js]
---*/
-assert.sameValue(Function.prototype.name, '');
-verifyNotEnumerable(Function.prototype, 'name');
-verifyNotWritable(Function.prototype, 'name');
-verifyConfigurable(Function.prototype, 'name');
+verifyProperty(Function.prototype, "name", {
+ value: "",
+ writable: false,
+ enumerable: false,
+ configurable: true
+});
reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Function/prototype/toString/name.js b/js/src/tests/test262/built-ins/Function/prototype/toString/name.js
index dc6751fd68..c16ded664e 100644
--- a/js/src/tests/test262/built-ins/Function/prototype/toString/name.js
+++ b/js/src/tests/test262/built-ins/Function/prototype/toString/name.js
@@ -19,10 +19,11 @@ info: |
includes: [propertyHelper.js]
---*/
-assert.sameValue(Function.prototype.toString.name, "toString");
-
-verifyNotEnumerable(Function.prototype.toString, "name");
-verifyNotWritable(Function.prototype.toString, "name");
-verifyConfigurable(Function.prototype.toString, "name");
+verifyProperty(Function.prototype.toString, "name", {
+ value: "toString",
+ writable: false,
+ enumerable: false,
+ configurable: true
+});
reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/Function/prototype/toString/not-a-constructor.js b/js/src/tests/test262/built-ins/Function/prototype/toString/not-a-constructor.js
index b13c0c51a2..6384ad81df 100644
--- a/js/src/tests/test262/built-ins/Function/prototype/toString/not-a-constructor.js
+++ b/js/src/tests/test262/built-ins/Function/prototype/toString/not-a-constructor.js
@@ -29,11 +29,11 @@ assert.sameValue(
assert.throws(TypeError, () => {
new Function.prototype.toString();
-}, '`new Function.prototype.toString()` throws TypeError');
+});
var toString = Function.prototype.toString;
assert.throws(TypeError, () => {
new toString;
-}, '`new toString` throws TypeError');
+});
reportCompare(0, 0);