summaryrefslogtreecommitdiff
path: root/test/language
diff options
context:
space:
mode:
Diffstat (limited to 'test/language')
-rw-r--r--test/language/expressions/class/restricted-properties.js (renamed from test/language/class/definition/ClassExpression_restricted-properties.js)18
-rw-r--r--test/language/statements/class/definition/methods-gen-no-yield.js (renamed from test/language/class/method-definition/generator-no-yield.js)0
-rw-r--r--test/language/statements/class/definition/methods-gen-return.js (renamed from test/language/class/method-definition/generator-return.js)0
-rw-r--r--test/language/statements/class/definition/methods-gen-yield-as-binding-identifier.js (renamed from test/language/class/method-definition/yield-as-binding-identifier.js)0
-rw-r--r--test/language/statements/class/definition/methods-gen-yield-as-expression-with-rhs.js (renamed from test/language/class/method-definition/yield-as-expression-with-rhs.js)0
-rw-r--r--test/language/statements/class/definition/methods-gen-yield-as-expression-without-rhs.js (renamed from test/language/class/method-definition/yield-as-expression-without-rhs.js)0
-rw-r--r--test/language/statements/class/definition/methods-gen-yield-as-function-expression-binding-identifier.js (renamed from test/language/class/method-definition/yield-as-function-expression-binding-identifier.js)0
-rw-r--r--test/language/statements/class/definition/methods-gen-yield-as-generator-method-binding-identifier.js (renamed from test/language/class/method-definition/yield-as-generator-method-binding-identifier.js)0
-rw-r--r--test/language/statements/class/definition/methods-gen-yield-as-identifier-in-nested-function.js (renamed from test/language/class/method-definition/yield-as-identifier-in-nested-function.js)0
-rw-r--r--test/language/statements/class/definition/methods-gen-yield-as-label.js (renamed from test/language/class/method-definition/yield-as-label.js)0
-rw-r--r--test/language/statements/class/definition/methods-gen-yield-as-literal-property-name.js (renamed from test/language/class/method-definition/yield-as-literal-property-name.js)0
-rw-r--r--test/language/statements/class/definition/methods-gen-yield-as-logical-or-expression.js (renamed from test/language/class/method-definition/yield-as-logical-or-expression.js)0
-rw-r--r--test/language/statements/class/definition/methods-gen-yield-as-parameter.js (renamed from test/language/class/method-definition/yield-as-parameter.js)0
-rw-r--r--test/language/statements/class/definition/methods-gen-yield-as-property-name.js (renamed from test/language/class/method-definition/yield-as-property-name.js)0
-rw-r--r--test/language/statements/class/definition/methods-gen-yield-as-statement.js (renamed from test/language/class/method-definition/yield-as-statement.js)0
-rw-r--r--test/language/statements/class/definition/methods-gen-yield-as-yield-operand.js (renamed from test/language/class/method-definition/yield-as-yield-operand.js)0
-rw-r--r--test/language/statements/class/definition/methods-gen-yield-newline.js (renamed from test/language/class/method-definition/yield-newline.js)0
-rw-r--r--test/language/statements/class/definition/methods-gen-yield-star-after-newline.js (renamed from test/language/class/method-definition/yield-star-after-newline.js)0
-rw-r--r--test/language/statements/class/definition/methods-gen-yield-star-before-newline.js (renamed from test/language/class/method-definition/yield-star-before-newline.js)0
-rw-r--r--test/language/statements/class/definition/methods-gen-yield-weak-binding.js (renamed from test/language/class/method-definition/yield-weak-binding.js)0
-rw-r--r--test/language/statements/class/definition/methods-restricted-properties.js (renamed from test/language/class/definition/ClassMethod_restricted-properties.js)43
-rw-r--r--test/language/statements/class/restricted-properties.js (renamed from test/language/class/definition/ClassDeclaration_restricted-properties.js)22
22 files changed, 61 insertions, 22 deletions
diff --git a/test/language/class/definition/ClassExpression_restricted-properties.js b/test/language/expressions/class/restricted-properties.js
index eeddff635..a9805c5df 100644
--- a/test/language/class/definition/ClassExpression_restricted-properties.js
+++ b/test/language/expressions/class/restricted-properties.js
@@ -1,7 +1,7 @@
// Copyright (C) 2015 Caitlin Potter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
-/*---
+/*---
description: >
Functions created using ClassExpression syntactic form do not
have own properties "caller" or "arguments", but inherit them from
@@ -11,8 +11,12 @@ es6id: 16.1
var BaseClass = class {};
-assert.sameValue(BaseClass.hasOwnProperty('caller'), false, 'Functions created using ClassExpression syntactic form do not have own property "caller"');
-assert.sameValue(BaseClass.hasOwnProperty('arguments'), false, 'Functions created using ClassExpression syntactic form do not have own property "arguments"');
+assert.sameValue(
+ BaseClass.hasOwnProperty('caller'), false, 'No "caller" own property'
+);
+assert.sameValue(
+ BaseClass.hasOwnProperty('arguments'), false, 'No "arguments" own property'
+);
assert.throws(TypeError, function() {
return BaseClass.caller;
@@ -32,8 +36,12 @@ assert.throws(TypeError, function() {
var SubClass = class extends BaseClass {};
-assert.sameValue(SubClass.hasOwnProperty('caller'), false, 'Functions created using ClassExpression syntactic form do not have own property "caller"');
-assert.sameValue(SubClass.hasOwnProperty('arguments'), false, 'Functions created using ClassExpression syntactic form do not have own property "arguments"');
+assert.sameValue(
+ SubClass.hasOwnProperty('caller'), false, 'No "caller" own property'
+);
+assert.sameValue(
+ SubClass.hasOwnProperty('arguments'), false, 'No "arguments" own property'
+);
assert.throws(TypeError, function() {
return SubClass.caller;
diff --git a/test/language/class/method-definition/generator-no-yield.js b/test/language/statements/class/definition/methods-gen-no-yield.js
index fbdd4ce00..fbdd4ce00 100644
--- a/test/language/class/method-definition/generator-no-yield.js
+++ b/test/language/statements/class/definition/methods-gen-no-yield.js
diff --git a/test/language/class/method-definition/generator-return.js b/test/language/statements/class/definition/methods-gen-return.js
index dc03f99e0..dc03f99e0 100644
--- a/test/language/class/method-definition/generator-return.js
+++ b/test/language/statements/class/definition/methods-gen-return.js
diff --git a/test/language/class/method-definition/yield-as-binding-identifier.js b/test/language/statements/class/definition/methods-gen-yield-as-binding-identifier.js
index 3bcdafe5d..3bcdafe5d 100644
--- a/test/language/class/method-definition/yield-as-binding-identifier.js
+++ b/test/language/statements/class/definition/methods-gen-yield-as-binding-identifier.js
diff --git a/test/language/class/method-definition/yield-as-expression-with-rhs.js b/test/language/statements/class/definition/methods-gen-yield-as-expression-with-rhs.js
index bea22a1d7..bea22a1d7 100644
--- a/test/language/class/method-definition/yield-as-expression-with-rhs.js
+++ b/test/language/statements/class/definition/methods-gen-yield-as-expression-with-rhs.js
diff --git a/test/language/class/method-definition/yield-as-expression-without-rhs.js b/test/language/statements/class/definition/methods-gen-yield-as-expression-without-rhs.js
index 8fb5aa265..8fb5aa265 100644
--- a/test/language/class/method-definition/yield-as-expression-without-rhs.js
+++ b/test/language/statements/class/definition/methods-gen-yield-as-expression-without-rhs.js
diff --git a/test/language/class/method-definition/yield-as-function-expression-binding-identifier.js b/test/language/statements/class/definition/methods-gen-yield-as-function-expression-binding-identifier.js
index bb081f14e..bb081f14e 100644
--- a/test/language/class/method-definition/yield-as-function-expression-binding-identifier.js
+++ b/test/language/statements/class/definition/methods-gen-yield-as-function-expression-binding-identifier.js
diff --git a/test/language/class/method-definition/yield-as-generator-method-binding-identifier.js b/test/language/statements/class/definition/methods-gen-yield-as-generator-method-binding-identifier.js
index 50e0709c7..50e0709c7 100644
--- a/test/language/class/method-definition/yield-as-generator-method-binding-identifier.js
+++ b/test/language/statements/class/definition/methods-gen-yield-as-generator-method-binding-identifier.js
diff --git a/test/language/class/method-definition/yield-as-identifier-in-nested-function.js b/test/language/statements/class/definition/methods-gen-yield-as-identifier-in-nested-function.js
index 1cf64ff35..1cf64ff35 100644
--- a/test/language/class/method-definition/yield-as-identifier-in-nested-function.js
+++ b/test/language/statements/class/definition/methods-gen-yield-as-identifier-in-nested-function.js
diff --git a/test/language/class/method-definition/yield-as-label.js b/test/language/statements/class/definition/methods-gen-yield-as-label.js
index 094f90ac7..094f90ac7 100644
--- a/test/language/class/method-definition/yield-as-label.js
+++ b/test/language/statements/class/definition/methods-gen-yield-as-label.js
diff --git a/test/language/class/method-definition/yield-as-literal-property-name.js b/test/language/statements/class/definition/methods-gen-yield-as-literal-property-name.js
index 9f71c92ef..9f71c92ef 100644
--- a/test/language/class/method-definition/yield-as-literal-property-name.js
+++ b/test/language/statements/class/definition/methods-gen-yield-as-literal-property-name.js
diff --git a/test/language/class/method-definition/yield-as-logical-or-expression.js b/test/language/statements/class/definition/methods-gen-yield-as-logical-or-expression.js
index f4bb32f41..f4bb32f41 100644
--- a/test/language/class/method-definition/yield-as-logical-or-expression.js
+++ b/test/language/statements/class/definition/methods-gen-yield-as-logical-or-expression.js
diff --git a/test/language/class/method-definition/yield-as-parameter.js b/test/language/statements/class/definition/methods-gen-yield-as-parameter.js
index a1b648051..a1b648051 100644
--- a/test/language/class/method-definition/yield-as-parameter.js
+++ b/test/language/statements/class/definition/methods-gen-yield-as-parameter.js
diff --git a/test/language/class/method-definition/yield-as-property-name.js b/test/language/statements/class/definition/methods-gen-yield-as-property-name.js
index 98e8873bd..98e8873bd 100644
--- a/test/language/class/method-definition/yield-as-property-name.js
+++ b/test/language/statements/class/definition/methods-gen-yield-as-property-name.js
diff --git a/test/language/class/method-definition/yield-as-statement.js b/test/language/statements/class/definition/methods-gen-yield-as-statement.js
index 2ae05047e..2ae05047e 100644
--- a/test/language/class/method-definition/yield-as-statement.js
+++ b/test/language/statements/class/definition/methods-gen-yield-as-statement.js
diff --git a/test/language/class/method-definition/yield-as-yield-operand.js b/test/language/statements/class/definition/methods-gen-yield-as-yield-operand.js
index 3bc45e984..3bc45e984 100644
--- a/test/language/class/method-definition/yield-as-yield-operand.js
+++ b/test/language/statements/class/definition/methods-gen-yield-as-yield-operand.js
diff --git a/test/language/class/method-definition/yield-newline.js b/test/language/statements/class/definition/methods-gen-yield-newline.js
index 96ea9a1b7..96ea9a1b7 100644
--- a/test/language/class/method-definition/yield-newline.js
+++ b/test/language/statements/class/definition/methods-gen-yield-newline.js
diff --git a/test/language/class/method-definition/yield-star-after-newline.js b/test/language/statements/class/definition/methods-gen-yield-star-after-newline.js
index 80cef3e56..80cef3e56 100644
--- a/test/language/class/method-definition/yield-star-after-newline.js
+++ b/test/language/statements/class/definition/methods-gen-yield-star-after-newline.js
diff --git a/test/language/class/method-definition/yield-star-before-newline.js b/test/language/statements/class/definition/methods-gen-yield-star-before-newline.js
index e27e009c8..e27e009c8 100644
--- a/test/language/class/method-definition/yield-star-before-newline.js
+++ b/test/language/statements/class/definition/methods-gen-yield-star-before-newline.js
diff --git a/test/language/class/method-definition/yield-weak-binding.js b/test/language/statements/class/definition/methods-gen-yield-weak-binding.js
index 8a8d4aa49..8a8d4aa49 100644
--- a/test/language/class/method-definition/yield-weak-binding.js
+++ b/test/language/statements/class/definition/methods-gen-yield-weak-binding.js
diff --git a/test/language/class/definition/ClassMethod_restricted-properties.js b/test/language/statements/class/definition/methods-restricted-properties.js
index 856d3123c..a8fe3ba2b 100644
--- a/test/language/class/definition/ClassMethod_restricted-properties.js
+++ b/test/language/statements/class/definition/methods-restricted-properties.js
@@ -1,10 +1,10 @@
// Copyright (C) 2015 Caitlin Potter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
-/*---
+/*---
description: >
- Functions created using MethodDefinition syntactic form do not
- have own properties "caller" or "arguments", but inherit them from
+ Functions created using MethodDefinition syntactic form do not have own
+ properties "caller" or "arguments", but inherit them from
%FunctionPrototype%.
es6id: 16.1
---*/
@@ -18,12 +18,36 @@ class Class {
var instance = new Class;
var accessor = Object.getOwnPropertyDescriptor(Class.prototype, "accessor");
-assert.sameValue(instance.method.hasOwnProperty('caller'), false, 'Functions created using MethodDefinition syntactic form do not have own property "caller"');
-assert.sameValue(instance.method.hasOwnProperty('arguments'), false, 'Functions created using MethodDefinition syntactic form do not have own property "arguments"');
-assert.sameValue(accessor.get.hasOwnProperty('caller'), false, 'Accessor Functions created using MethodDefinition syntactic form do not have own property "caller"');
-assert.sameValue(accessor.get.hasOwnProperty('arguments'), false, 'Accessor Functions created using MethodDefinition syntactic form do not have own property "arguments"');
-assert.sameValue(accessor.set.hasOwnProperty('caller'), false, 'Accessor Functions created using MethodDefinition syntactic form do not have own property "caller"');
-assert.sameValue(accessor.set.hasOwnProperty('arguments'), false, 'Accessor Functions created using MethodDefinition syntactic form do not have own property "arguments"');
+assert.sameValue(
+ instance.method.hasOwnProperty('caller'),
+ false,
+ 'No "caller" own property (method)'
+);
+assert.sameValue(
+ instance.method.hasOwnProperty('arguments'),
+ false,
+ 'No "arguments" own property (method)'
+);
+assert.sameValue(
+ accessor.get.hasOwnProperty('caller'),
+ false,
+ 'No "caller" own property ("get" accessor)'
+);
+assert.sameValue(
+ accessor.get.hasOwnProperty('arguments'),
+ false,
+ 'No "arguments" own property ("get" accessor)'
+);
+assert.sameValue(
+ accessor.set.hasOwnProperty('caller'),
+ false,
+ 'No "caller" own property ("set" accessor)'
+);
+assert.sameValue(
+ accessor.set.hasOwnProperty('arguments'),
+ false,
+ 'No "arguments" own property ("set" accessor)'
+);
// --- Test method restricted properties throw
@@ -78,4 +102,3 @@ assert.throws(TypeError, function() {
assert.throws(TypeError, function() {
accessor.set.arguments = {};
});
-
diff --git a/test/language/class/definition/ClassDeclaration_restricted-properties.js b/test/language/statements/class/restricted-properties.js
index 32fd08f91..4aec76cb3 100644
--- a/test/language/class/definition/ClassDeclaration_restricted-properties.js
+++ b/test/language/statements/class/restricted-properties.js
@@ -1,18 +1,22 @@
// Copyright (C) 2015 Caitlin Potter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
-/*---
+/*---
description: >
- Functions created using ClassDeclaration syntactic form do not
- have own properties "caller" or "arguments", but inherit them from
+ Functions created using ClassDeclaration syntactic form do not have own
+ properties "caller" or "arguments", but inherit them from
%FunctionPrototype%.
es6id: 16.1
---*/
class BaseClass {}
-assert.sameValue(BaseClass.hasOwnProperty('caller'), false, 'Functions created using ClassDeclaration syntactic form do not have own property "caller"');
-assert.sameValue(BaseClass.hasOwnProperty('arguments'), false, 'Functions created using ClassDeclaration syntactic form do not have own property "arguments"');
+assert.sameValue(
+ BaseClass.hasOwnProperty('caller'), false, 'No "caller" own property'
+);
+assert.sameValue(
+ BaseClass.hasOwnProperty('arguments'), false, 'No "arguments" own property'
+);
assert.throws(TypeError, function() {
return BaseClass.caller;
@@ -32,8 +36,12 @@ assert.throws(TypeError, function() {
class SubClass extends BaseClass {}
-assert.sameValue(SubClass.hasOwnProperty('caller'), false, 'Functions created using ClassDeclaration syntactic form do not have own property "caller"');
-assert.sameValue(SubClass.hasOwnProperty('arguments'), false, 'Functions created using ClassDeclaration syntactic form do not have own property "arguments"');
+assert.sameValue(
+ SubClass.hasOwnProperty('caller'), false, 'No "caller" own property'
+);
+assert.sameValue(
+ SubClass.hasOwnProperty('arguments'), false, 'No "arguments" own property'
+);
assert.throws(TypeError, function() {
return SubClass.caller;