Improve coverage for class "name" inference (#718)

* Extend tests for class "name" inference

Ensure that when a class defines a static "name" method, that method
definition prevents the "name" inference behavior.

* Re-generate tests
This commit is contained in:
jugglinmike 2016-07-08 21:37:04 -04:00 committed by Tom Care
parent 8d78eddcc6
commit 2bfaa0d895
95 changed files with 204 additions and 105 deletions

View File

@ -21,13 +21,14 @@ features: [class]
---*/ ---*/
//- setup //- setup
var xCls, cls; var xCls, cls, xCls2;
//- elems //- elems
[ xCls = class x {},cls = class {} ] [ xCls = class x {}, cls = class {}, xCls2 = class { static name() {} } ]
//- vals //- vals
[] []
//- body //- body
assert(xCls.name !== 'xCls'); assert(xCls.name !== 'xCls');
assert(xCls2.name !== 'xCls2');
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
verifyNotEnumerable(cls, 'name'); verifyNotEnumerable(cls, 'name');

View File

@ -20,13 +20,14 @@ features: [class]
---*/ ---*/
//- setup //- setup
var xCls, cls; var xCls, cls, xCls2;
//- elems //- elems
{ xCls = class x {}, cls = class {} } { xCls = class x {}, cls = class {}, xCls2 = class { static name() {} } }
//- vals //- vals
{} {}
//- body //- body
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
verifyNotEnumerable(cls, 'name'); verifyNotEnumerable(cls, 'name');

View File

@ -21,13 +21,14 @@ features: [class]
---*/ ---*/
//- setup //- setup
var xCls, cls; var xCls, cls, xCls2;
//- elems //- elems
{ x: xCls = class x {}, x: cls = class {} } { x: xCls = class x {}, x: cls = class {}, x: xCls2 = class { static name() {} } }
//- vals //- vals
{} {}
//- body //- body
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
verifyNotEnumerable(cls, 'name'); verifyNotEnumerable(cls, 'name');

View File

@ -20,9 +20,10 @@ info: |
---*/ ---*/
//- elems //- elems
[cls = class {}, xCls = class X {}] [cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }]
//- vals //- vals
[] []
//- body //- body
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');

View File

@ -19,9 +19,10 @@ info: |
---*/ ---*/
//- elems //- elems
{ cls = class {}, xCls = class X {} } { cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } }
//- vals //- vals
{} {}
//- body //- body
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');

View File

@ -54,9 +54,10 @@ info: |
var callCount = 0; var callCount = 0;
var f; var f;
f = ([cls = class {}, xCls = class X {}]) => { f = ([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }]) => {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
}; };

View File

@ -54,9 +54,10 @@ info: |
var callCount = 0; var callCount = 0;
var f; var f;
f = ([cls = class {}, xCls = class X {}] = []) => { f = ([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }] = []) => {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
}; };

View File

@ -53,9 +53,10 @@ info: |
var callCount = 0; var callCount = 0;
var f; var f;
f = ({ cls = class {}, xCls = class X {} } = {}) => { f = ({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } } = {}) => {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
}; };

View File

@ -53,9 +53,10 @@ info: |
var callCount = 0; var callCount = 0;
var f; var f;
f = ({ cls = class {}, xCls = class X {} }) => { f = ({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } }) => {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
}; };

View File

@ -27,14 +27,15 @@ info: |
GetReferencedName(lref)). GetReferencedName(lref)).
---*/ ---*/
var xCls, cls; var xCls, cls, xCls2;
var result; var result;
var vals = []; var vals = [];
result = [ xCls = class x {},cls = class {} ] = vals; result = [ xCls = class x {}, cls = class {}, xCls2 = class { static name() {} } ] = vals;
assert(xCls.name !== 'xCls'); assert(xCls.name !== 'xCls');
assert(xCls2.name !== 'xCls2');
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
verifyNotEnumerable(cls, 'name'); verifyNotEnumerable(cls, 'name');

View File

@ -26,14 +26,15 @@ info: |
iii. If hasNameProperty is false, perform SetFunctionName(v, P). iii. If hasNameProperty is false, perform SetFunctionName(v, P).
---*/ ---*/
var xCls, cls; var xCls, cls, xCls2;
var result; var result;
var vals = {}; var vals = {};
result = { xCls = class x {}, cls = class {} } = vals; result = { xCls = class x {}, cls = class {}, xCls2 = class { static name() {} } } = vals;
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
verifyNotEnumerable(cls, 'name'); verifyNotEnumerable(cls, 'name');

View File

@ -27,14 +27,15 @@ info: |
GetReferencedName(lref)). GetReferencedName(lref)).
---*/ ---*/
var xCls, cls; var xCls, cls, xCls2;
var result; var result;
var vals = {}; var vals = {};
result = { x: xCls = class x {}, x: cls = class {} } = vals; result = { x: xCls = class x {}, x: cls = class {}, x: xCls2 = class { static name() {} } } = vals;
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
verifyNotEnumerable(cls, 'name'); verifyNotEnumerable(cls, 'name');

View File

@ -22,12 +22,14 @@ includes: [propertyHelper.js]
features: [class] features: [class]
---*/ ---*/
var xCls, cls; var xCls, cls, xCls2;
xCls = class x {}; xCls = class x {};
cls = class {}; cls = class {};
xCls2 = class { static name() {} };
assert(xCls.name !== 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
verifyNotEnumerable(cls, 'name'); verifyNotEnumerable(cls, 'name');

View File

@ -78,9 +78,10 @@ info: |
var callCount = 0; var callCount = 0;
var C = class { var C = class {
*method([cls = class {}, xCls = class X {}]) { *method([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }]) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -78,9 +78,10 @@ info: |
var callCount = 0; var callCount = 0;
var C = class { var C = class {
*method([cls = class {}, xCls = class X {}] = []) { *method([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }] = []) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -77,9 +77,10 @@ info: |
var callCount = 0; var callCount = 0;
var C = class { var C = class {
*method({ cls = class {}, xCls = class X {} } = {}) { *method({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } } = {}) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -77,9 +77,10 @@ info: |
var callCount = 0; var callCount = 0;
var C = class { var C = class {
*method({ cls = class {}, xCls = class X {} }) { *method({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } }) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -78,9 +78,10 @@ info: |
var callCount = 0; var callCount = 0;
var C = class { var C = class {
static *method([cls = class {}, xCls = class X {}]) { static *method([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }]) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -78,9 +78,10 @@ info: |
var callCount = 0; var callCount = 0;
var C = class { var C = class {
static *method([cls = class {}, xCls = class X {}] = []) { static *method([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }] = []) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -77,9 +77,10 @@ info: |
var callCount = 0; var callCount = 0;
var C = class { var C = class {
static *method({ cls = class {}, xCls = class X {} } = {}) { static *method({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } } = {}) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -77,9 +77,10 @@ info: |
var callCount = 0; var callCount = 0;
var C = class { var C = class {
static *method({ cls = class {}, xCls = class X {} }) { static *method({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } }) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -75,9 +75,10 @@ info: |
var callCount = 0; var callCount = 0;
var C = class { var C = class {
method([cls = class {}, xCls = class X {}]) { method([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }]) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -75,9 +75,10 @@ info: |
var callCount = 0; var callCount = 0;
var C = class { var C = class {
method([cls = class {}, xCls = class X {}] = []) { method([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }] = []) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -74,9 +74,10 @@ info: |
var callCount = 0; var callCount = 0;
var C = class { var C = class {
method({ cls = class {}, xCls = class X {} } = {}) { method({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } } = {}) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -74,9 +74,10 @@ info: |
var callCount = 0; var callCount = 0;
var C = class { var C = class {
method({ cls = class {}, xCls = class X {} }) { method({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } }) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -75,9 +75,10 @@ info: |
var callCount = 0; var callCount = 0;
var C = class { var C = class {
static method([cls = class {}, xCls = class X {}]) { static method([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }]) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -75,9 +75,10 @@ info: |
var callCount = 0; var callCount = 0;
var C = class { var C = class {
static method([cls = class {}, xCls = class X {}] = []) { static method([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }] = []) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -74,9 +74,10 @@ info: |
var callCount = 0; var callCount = 0;
var C = class { var C = class {
static method({ cls = class {}, xCls = class X {} } = {}) { static method({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } } = {}) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -74,9 +74,10 @@ info: |
var callCount = 0; var callCount = 0;
var C = class { var C = class {
static method({ cls = class {}, xCls = class X {} }) { static method({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } }) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -55,9 +55,10 @@ info: |
var callCount = 0; var callCount = 0;
var f; var f;
f = function([cls = class {}, xCls = class X {}]) { f = function([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }]) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
}; };

View File

@ -55,9 +55,10 @@ info: |
var callCount = 0; var callCount = 0;
var f; var f;
f = function([cls = class {}, xCls = class X {}] = []) { f = function([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }] = []) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
}; };

View File

@ -54,9 +54,10 @@ info: |
var callCount = 0; var callCount = 0;
var f; var f;
f = function({ cls = class {}, xCls = class X {} } = {}) { f = function({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } } = {}) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
}; };

View File

@ -54,9 +54,10 @@ info: |
var callCount = 0; var callCount = 0;
var f; var f;
f = function({ cls = class {}, xCls = class X {} }) { f = function({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } }) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
}; };

View File

@ -55,9 +55,10 @@ info: |
var callCount = 0; var callCount = 0;
var f; var f;
f = function*([cls = class {}, xCls = class X {}]) { f = function*([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }]) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
}; };

View File

@ -55,9 +55,10 @@ info: |
var callCount = 0; var callCount = 0;
var f; var f;
f = function*([cls = class {}, xCls = class X {}] = []) { f = function*([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }] = []) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
}; };

View File

@ -54,9 +54,10 @@ info: |
var callCount = 0; var callCount = 0;
var f; var f;
f = function*({ cls = class {}, xCls = class X {} } = {}) { f = function*({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } } = {}) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
}; };

View File

@ -54,9 +54,10 @@ info: |
var callCount = 0; var callCount = 0;
var f; var f;
f = function*({ cls = class {}, xCls = class X {} }) { f = function*({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } }) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
}; };

View File

@ -60,9 +60,10 @@ info: |
var callCount = 0; var callCount = 0;
var obj = { var obj = {
*method([cls = class {}, xCls = class X {}]) { *method([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }]) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -60,9 +60,10 @@ info: |
var callCount = 0; var callCount = 0;
var obj = { var obj = {
*method([cls = class {}, xCls = class X {}] = []) { *method([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }] = []) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -59,9 +59,10 @@ info: |
var callCount = 0; var callCount = 0;
var obj = { var obj = {
*method({ cls = class {}, xCls = class X {} } = {}) { *method({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } } = {}) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -59,9 +59,10 @@ info: |
var callCount = 0; var callCount = 0;
var obj = { var obj = {
*method({ cls = class {}, xCls = class X {} }) { *method({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } }) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -57,9 +57,10 @@ info: |
var callCount = 0; var callCount = 0;
var obj = { var obj = {
method([cls = class {}, xCls = class X {}]) { method([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }]) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -57,9 +57,10 @@ info: |
var callCount = 0; var callCount = 0;
var obj = { var obj = {
method([cls = class {}, xCls = class X {}] = []) { method([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }] = []) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -56,9 +56,10 @@ info: |
var callCount = 0; var callCount = 0;
var obj = { var obj = {
method({ cls = class {}, xCls = class X {} } = {}) { method({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } } = {}) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -56,9 +56,10 @@ info: |
var callCount = 0; var callCount = 0;
var obj = { var obj = {
method({ cls = class {}, xCls = class X {} }) { method({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } }) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -76,9 +76,10 @@ info: |
var callCount = 0; var callCount = 0;
class C { class C {
*method([cls = class {}, xCls = class X {}]) { *method([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }]) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -76,9 +76,10 @@ info: |
var callCount = 0; var callCount = 0;
class C { class C {
*method([cls = class {}, xCls = class X {}] = []) { *method([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }] = []) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -75,9 +75,10 @@ info: |
var callCount = 0; var callCount = 0;
class C { class C {
*method({ cls = class {}, xCls = class X {} } = {}) { *method({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } } = {}) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -75,9 +75,10 @@ info: |
var callCount = 0; var callCount = 0;
class C { class C {
*method({ cls = class {}, xCls = class X {} }) { *method({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } }) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -76,9 +76,10 @@ info: |
var callCount = 0; var callCount = 0;
class C { class C {
static *method([cls = class {}, xCls = class X {}]) { static *method([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }]) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -76,9 +76,10 @@ info: |
var callCount = 0; var callCount = 0;
class C { class C {
static *method([cls = class {}, xCls = class X {}] = []) { static *method([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }] = []) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -75,9 +75,10 @@ info: |
var callCount = 0; var callCount = 0;
class C { class C {
static *method({ cls = class {}, xCls = class X {} } = {}) { static *method({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } } = {}) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -75,9 +75,10 @@ info: |
var callCount = 0; var callCount = 0;
class C { class C {
static *method({ cls = class {}, xCls = class X {} }) { static *method({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } }) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -74,9 +74,10 @@ info: |
var callCount = 0; var callCount = 0;
class C { class C {
method([cls = class {}, xCls = class X {}]) { method([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }]) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -74,9 +74,10 @@ info: |
var callCount = 0; var callCount = 0;
class C { class C {
method([cls = class {}, xCls = class X {}] = []) { method([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }] = []) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -73,9 +73,10 @@ info: |
var callCount = 0; var callCount = 0;
class C { class C {
method({ cls = class {}, xCls = class X {} } = {}) { method({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } } = {}) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -73,9 +73,10 @@ info: |
var callCount = 0; var callCount = 0;
class C { class C {
method({ cls = class {}, xCls = class X {} }) { method({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } }) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -74,9 +74,10 @@ info: |
var callCount = 0; var callCount = 0;
class C { class C {
static method([cls = class {}, xCls = class X {}]) { static method([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }]) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -74,9 +74,10 @@ info: |
var callCount = 0; var callCount = 0;
class C { class C {
static method([cls = class {}, xCls = class X {}] = []) { static method([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }] = []) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -73,9 +73,10 @@ info: |
var callCount = 0; var callCount = 0;
class C { class C {
static method({ cls = class {}, xCls = class X {} } = {}) { static method({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } } = {}) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -73,9 +73,10 @@ info: |
var callCount = 0; var callCount = 0;
class C { class C {
static method({ cls = class {}, xCls = class X {} }) { static method({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } }) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
} }
}; };

View File

@ -32,7 +32,8 @@ info: |
8. Return InitializeReferencedBinding(lhs, v). 8. Return InitializeReferencedBinding(lhs, v).
---*/ ---*/
const [cls = class {}, xCls = class X {}] = []; const [cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }] = [];
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');

View File

@ -31,7 +31,8 @@ info: |
bindingId). bindingId).
---*/ ---*/
const { cls = class {}, xCls = class X {} } = {}; const { cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } } = {};
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');

View File

@ -19,8 +19,10 @@ features: [class]
const xCls = class x {}; const xCls = class x {};
const cls = class {}; const cls = class {};
const xCls2 = class { static name() {} };
assert(xCls.name !== 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
verifyNotEnumerable(cls, 'name'); verifyNotEnumerable(cls, 'name');

View File

@ -36,12 +36,13 @@ info: |
GetReferencedName(lref)). GetReferencedName(lref)).
---*/ ---*/
var xCls, cls; var xCls, cls, xCls2;
var counter = 0; var counter = 0;
for ([ xCls = class x {},cls = class {} ] of [[]]) { for ([ xCls = class x {}, cls = class {}, xCls2 = class { static name() {} } ] of [[]]) {
assert(xCls.name !== 'xCls'); assert(xCls.name !== 'xCls');
assert(xCls2.name !== 'xCls2');
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
verifyNotEnumerable(cls, 'name'); verifyNotEnumerable(cls, 'name');

View File

@ -53,9 +53,10 @@ info: |
var iterCount = 0; var iterCount = 0;
for (const [cls = class {}, xCls = class X {}] of [[]]) { for (const [cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }] of [[]]) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
iterCount += 1; iterCount += 1;
} }

View File

@ -52,9 +52,10 @@ info: |
var iterCount = 0; var iterCount = 0;
for (const { cls = class {}, xCls = class X {} } of [{}]) { for (const { cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } } of [{}]) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
iterCount += 1; iterCount += 1;
} }

View File

@ -53,9 +53,10 @@ info: |
var iterCount = 0; var iterCount = 0;
for (let [cls = class {}, xCls = class X {}] of [[]]) { for (let [cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }] of [[]]) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
iterCount += 1; iterCount += 1;
} }

View File

@ -52,9 +52,10 @@ info: |
var iterCount = 0; var iterCount = 0;
for (let { cls = class {}, xCls = class X {} } of [{}]) { for (let { cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } } of [{}]) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
iterCount += 1; iterCount += 1;
} }

View File

@ -35,12 +35,13 @@ info: |
iii. If hasNameProperty is false, perform SetFunctionName(v, P). iii. If hasNameProperty is false, perform SetFunctionName(v, P).
---*/ ---*/
var xCls, cls; var xCls, cls, xCls2;
var counter = 0; var counter = 0;
for ({ xCls = class x {}, cls = class {} } of [{}]) { for ({ xCls = class x {}, cls = class {}, xCls2 = class { static name() {} } } of [{}]) {
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
verifyNotEnumerable(cls, 'name'); verifyNotEnumerable(cls, 'name');

View File

@ -36,12 +36,13 @@ info: |
GetReferencedName(lref)). GetReferencedName(lref)).
---*/ ---*/
var xCls, cls; var xCls, cls, xCls2;
var counter = 0; var counter = 0;
for ({ x: xCls = class x {}, x: cls = class {} } of [{}]) { for ({ x: xCls = class x {}, x: cls = class {}, x: xCls2 = class { static name() {} } } of [{}]) {
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
verifyNotEnumerable(cls, 'name'); verifyNotEnumerable(cls, 'name');

View File

@ -50,9 +50,10 @@ info: |
var iterCount = 0; var iterCount = 0;
for (var [cls = class {}, xCls = class X {}] of [[]]) { for (var [cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }] of [[]]) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
iterCount += 1; iterCount += 1;
} }

View File

@ -49,9 +49,10 @@ info: |
var iterCount = 0; var iterCount = 0;
for (var { cls = class {}, xCls = class X {} } of [{}]) { for (var { cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } } of [{}]) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
iterCount += 1; iterCount += 1;
} }

View File

@ -53,9 +53,10 @@ info: |
var iterCount = 0; var iterCount = 0;
for (const [cls = class {}, xCls = class X {}] = []; iterCount < 1; ) { for (const [cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }] = []; iterCount < 1; ) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
iterCount += 1; iterCount += 1;
} }

View File

@ -52,9 +52,10 @@ info: |
var iterCount = 0; var iterCount = 0;
for (const { cls = class {}, xCls = class X {} } = {}; iterCount < 1; ) { for (const { cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } } = {}; iterCount < 1; ) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
iterCount += 1; iterCount += 1;
} }

View File

@ -53,9 +53,10 @@ info: |
var iterCount = 0; var iterCount = 0;
for (let [cls = class {}, xCls = class X {}] = []; iterCount < 1; ) { for (let [cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }] = []; iterCount < 1; ) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
iterCount += 1; iterCount += 1;
} }

View File

@ -52,9 +52,10 @@ info: |
var iterCount = 0; var iterCount = 0;
for (let { cls = class {}, xCls = class X {} } = {}; iterCount < 1; ) { for (let { cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } } = {}; iterCount < 1; ) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
iterCount += 1; iterCount += 1;
} }

View File

@ -47,9 +47,10 @@ info: |
var iterCount = 0; var iterCount = 0;
for (var [cls = class {}, xCls = class X {}] = []; iterCount < 1; ) { for (var [cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }] = []; iterCount < 1; ) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
iterCount += 1; iterCount += 1;
} }

View File

@ -46,9 +46,10 @@ info: |
var iterCount = 0; var iterCount = 0;
for (var { cls = class {}, xCls = class X {} } = {}; iterCount < 1; ) { for (var { cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } } = {}; iterCount < 1; ) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
iterCount += 1; iterCount += 1;
} }

View File

@ -55,9 +55,10 @@ info: |
---*/ ---*/
var callCount = 0; var callCount = 0;
function f([cls = class {}, xCls = class X {}]) { function f([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }]) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
}; };
f([]); f([]);

View File

@ -55,9 +55,10 @@ info: |
---*/ ---*/
var callCount = 0; var callCount = 0;
function f([cls = class {}, xCls = class X {}] = []) { function f([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }] = []) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
}; };
f(); f();

View File

@ -54,9 +54,10 @@ info: |
---*/ ---*/
var callCount = 0; var callCount = 0;
function f({ cls = class {}, xCls = class X {} } = {}) { function f({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } } = {}) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
}; };
f(); f();

View File

@ -54,9 +54,10 @@ info: |
---*/ ---*/
var callCount = 0; var callCount = 0;
function f({ cls = class {}, xCls = class X {} }) { function f({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } }) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
}; };
f({}); f({});

View File

@ -54,9 +54,10 @@ info: |
---*/ ---*/
var callCount = 0; var callCount = 0;
function* f([cls = class {}, xCls = class X {}]) { function* f([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }]) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
}; };
f([]).next(); f([]).next();

View File

@ -54,9 +54,10 @@ info: |
---*/ ---*/
var callCount = 0; var callCount = 0;
function* f([cls = class {}, xCls = class X {}] = []) { function* f([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }] = []) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
}; };
f().next(); f().next();

View File

@ -53,9 +53,10 @@ info: |
---*/ ---*/
var callCount = 0; var callCount = 0;
function* f({ cls = class {}, xCls = class X {} } = {}) { function* f({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } } = {}) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
}; };
f().next(); f().next();

View File

@ -53,9 +53,10 @@ info: |
---*/ ---*/
var callCount = 0; var callCount = 0;
function* f({ cls = class {}, xCls = class X {} }) { function* f({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } }) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
callCount = callCount + 1; callCount = callCount + 1;
}; };
f({}).next(); f({}).next();

View File

@ -32,7 +32,8 @@ info: |
8. Return InitializeReferencedBinding(lhs, v). 8. Return InitializeReferencedBinding(lhs, v).
---*/ ---*/
let [cls = class {}, xCls = class X {}] = []; let [cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }] = [];
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');

View File

@ -31,7 +31,8 @@ info: |
bindingId). bindingId).
---*/ ---*/
let { cls = class {}, xCls = class X {} } = {}; let { cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } } = {};
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');

View File

@ -19,8 +19,10 @@ features: [class]
let xCls = class x {}; let xCls = class x {};
let cls = class {}; let cls = class {};
let xCls2 = class { static name() {} };
assert(xCls.name !== 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
verifyNotEnumerable(cls, 'name'); verifyNotEnumerable(cls, 'name');

View File

@ -34,9 +34,10 @@ var ranCatch = false;
try { try {
throw []; throw [];
} catch ([cls = class {}, xCls = class X {}]) { } catch ([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }]) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
ranCatch = true; ranCatch = true;
} }

View File

@ -33,9 +33,10 @@ var ranCatch = false;
try { try {
throw {}; throw {};
} catch ({ cls = class {}, xCls = class X {} }) { } catch ({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } }) {
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
ranCatch = true; ranCatch = true;
} }

View File

@ -31,7 +31,8 @@ info: |
8. Return InitializeReferencedBinding(lhs, v). 8. Return InitializeReferencedBinding(lhs, v).
---*/ ---*/
var [cls = class {}, xCls = class X {}] = []; var [cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }] = [];
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');

View File

@ -30,7 +30,8 @@ info: |
bindingId). bindingId).
---*/ ---*/
var { cls = class {}, xCls = class X {} } = {}; var { cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } } = {};
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');

View File

@ -19,8 +19,10 @@ features: [class]
var xCls = class x {}; var xCls = class x {};
var cls = class {}; var cls = class {};
var xCls2 = class { static name() {} };
assert(xCls.name !== 'xCls'); assert.notSameValue(xCls.name, 'xCls');
assert.notSameValue(xCls2.name, 'xCls2');
assert.sameValue(cls.name, 'cls'); assert.sameValue(cls.name, 'cls');
verifyNotEnumerable(cls, 'name'); verifyNotEnumerable(cls, 'name');