mirror of
https://github.com/tc39/test262.git
synced 2025-07-22 21:45:04 +02:00
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:
parent
8d78eddcc6
commit
2bfaa0d895
@ -21,13 +21,14 @@ features: [class]
|
||||
---*/
|
||||
|
||||
//- setup
|
||||
var xCls, cls;
|
||||
var xCls, cls, xCls2;
|
||||
//- elems
|
||||
[ xCls = class x {},cls = class {} ]
|
||||
[ xCls = class x {}, cls = class {}, xCls2 = class { static name() {} } ]
|
||||
//- vals
|
||||
[]
|
||||
//- body
|
||||
assert(xCls.name !== 'xCls');
|
||||
assert(xCls2.name !== 'xCls2');
|
||||
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
verifyNotEnumerable(cls, 'name');
|
||||
|
@ -20,13 +20,14 @@ features: [class]
|
||||
---*/
|
||||
|
||||
//- setup
|
||||
var xCls, cls;
|
||||
var xCls, cls, xCls2;
|
||||
//- elems
|
||||
{ xCls = class x {}, cls = class {} }
|
||||
{ xCls = class x {}, cls = class {}, xCls2 = class { static name() {} } }
|
||||
//- vals
|
||||
{}
|
||||
//- body
|
||||
assert.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
verifyNotEnumerable(cls, 'name');
|
||||
|
@ -21,13 +21,14 @@ features: [class]
|
||||
---*/
|
||||
|
||||
//- setup
|
||||
var xCls, cls;
|
||||
var xCls, cls, xCls2;
|
||||
//- elems
|
||||
{ x: xCls = class x {}, x: cls = class {} }
|
||||
{ x: xCls = class x {}, x: cls = class {}, x: xCls2 = class { static name() {} } }
|
||||
//- vals
|
||||
{}
|
||||
//- body
|
||||
assert.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
verifyNotEnumerable(cls, 'name');
|
||||
|
@ -20,9 +20,10 @@ info: |
|
||||
---*/
|
||||
|
||||
//- elems
|
||||
[cls = class {}, xCls = class X {}]
|
||||
[cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }]
|
||||
//- vals
|
||||
[]
|
||||
//- body
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
assert.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
|
@ -19,9 +19,10 @@ info: |
|
||||
---*/
|
||||
|
||||
//- elems
|
||||
{ cls = class {}, xCls = class X {} }
|
||||
{ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } }
|
||||
//- vals
|
||||
{}
|
||||
//- body
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
assert.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
|
@ -54,9 +54,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = ([cls = class {}, xCls = class X {}]) => {
|
||||
f = ([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }]) => {
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
assert.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
|
@ -54,9 +54,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = ([cls = class {}, xCls = class X {}] = []) => {
|
||||
f = ([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }] = []) => {
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
assert.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
|
@ -53,9 +53,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = ({ cls = class {}, xCls = class X {} } = {}) => {
|
||||
f = ({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } } = {}) => {
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
assert.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
|
@ -53,9 +53,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = ({ cls = class {}, xCls = class X {} }) => {
|
||||
f = ({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } }) => {
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
assert.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
|
@ -27,14 +27,15 @@ info: |
|
||||
GetReferencedName(lref)).
|
||||
|
||||
---*/
|
||||
var xCls, cls;
|
||||
var xCls, cls, xCls2;
|
||||
|
||||
var result;
|
||||
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(xCls2.name !== 'xCls2');
|
||||
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
verifyNotEnumerable(cls, 'name');
|
||||
|
@ -26,14 +26,15 @@ info: |
|
||||
iii. If hasNameProperty is false, perform SetFunctionName(v, P).
|
||||
|
||||
---*/
|
||||
var xCls, cls;
|
||||
var xCls, cls, xCls2;
|
||||
|
||||
var result;
|
||||
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(xCls2.name, 'xCls2');
|
||||
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
verifyNotEnumerable(cls, 'name');
|
||||
|
@ -27,14 +27,15 @@ info: |
|
||||
GetReferencedName(lref)).
|
||||
|
||||
---*/
|
||||
var xCls, cls;
|
||||
var xCls, cls, xCls2;
|
||||
|
||||
var result;
|
||||
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(xCls2.name, 'xCls2');
|
||||
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
verifyNotEnumerable(cls, 'name');
|
||||
|
@ -22,12 +22,14 @@ includes: [propertyHelper.js]
|
||||
features: [class]
|
||||
---*/
|
||||
|
||||
var xCls, cls;
|
||||
var xCls, cls, xCls2;
|
||||
|
||||
xCls = class x {};
|
||||
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');
|
||||
verifyNotEnumerable(cls, 'name');
|
||||
|
@ -78,9 +78,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -78,9 +78,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -77,9 +77,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -77,9 +77,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -78,9 +78,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -78,9 +78,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -77,9 +77,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -77,9 +77,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -75,9 +75,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -75,9 +75,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -74,9 +74,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -74,9 +74,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -75,9 +75,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -75,9 +75,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -74,9 +74,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -74,9 +74,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -55,9 +55,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
|
@ -55,9 +55,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
|
@ -54,9 +54,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
|
@ -54,9 +54,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
|
@ -55,9 +55,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
|
@ -55,9 +55,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
|
@ -54,9 +54,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
|
@ -54,9 +54,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
|
@ -60,9 +60,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
var obj = {
|
||||
*method([cls = class {}, xCls = class X {}]) {
|
||||
*method([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }]) {
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
assert.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -60,9 +60,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
var obj = {
|
||||
*method([cls = class {}, xCls = class X {}] = []) {
|
||||
*method([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }] = []) {
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
assert.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -59,9 +59,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
var obj = {
|
||||
*method({ cls = class {}, xCls = class X {} } = {}) {
|
||||
*method({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } } = {}) {
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
assert.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -59,9 +59,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
var obj = {
|
||||
*method({ cls = class {}, xCls = class X {} }) {
|
||||
*method({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } }) {
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
assert.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -57,9 +57,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
var obj = {
|
||||
method([cls = class {}, xCls = class X {}]) {
|
||||
method([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }]) {
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
assert.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -57,9 +57,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
var obj = {
|
||||
method([cls = class {}, xCls = class X {}] = []) {
|
||||
method([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }] = []) {
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
assert.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -56,9 +56,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
var obj = {
|
||||
method({ cls = class {}, xCls = class X {} } = {}) {
|
||||
method({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } } = {}) {
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
assert.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -56,9 +56,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
var obj = {
|
||||
method({ cls = class {}, xCls = class X {} }) {
|
||||
method({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } }) {
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
assert.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -76,9 +76,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
*method([cls = class {}, xCls = class X {}]) {
|
||||
*method([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }]) {
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
assert.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -76,9 +76,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
*method([cls = class {}, xCls = class X {}] = []) {
|
||||
*method([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }] = []) {
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
assert.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -75,9 +75,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
*method({ cls = class {}, xCls = class X {} } = {}) {
|
||||
*method({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } } = {}) {
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
assert.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -75,9 +75,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
*method({ cls = class {}, xCls = class X {} }) {
|
||||
*method({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } }) {
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
assert.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -76,9 +76,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -76,9 +76,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -75,9 +75,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -75,9 +75,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -74,9 +74,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
method([cls = class {}, xCls = class X {}]) {
|
||||
method([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }]) {
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
assert.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -74,9 +74,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
method([cls = class {}, xCls = class X {}] = []) {
|
||||
method([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }] = []) {
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
assert.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -73,9 +73,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
method({ cls = class {}, xCls = class X {} } = {}) {
|
||||
method({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } } = {}) {
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
assert.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -73,9 +73,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
class C {
|
||||
method({ cls = class {}, xCls = class X {} }) {
|
||||
method({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } }) {
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
assert.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -74,9 +74,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -74,9 +74,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -73,9 +73,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -73,9 +73,10 @@ info: |
|
||||
|
||||
var callCount = 0;
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -32,7 +32,8 @@ info: |
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
|
@ -31,7 +31,8 @@ info: |
|
||||
bindingId).
|
||||
---*/
|
||||
|
||||
const { cls = class {}, xCls = class X {} } = {};
|
||||
const { cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } } = {};
|
||||
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
assert.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
|
@ -19,8 +19,10 @@ features: [class]
|
||||
|
||||
const xCls = class x {};
|
||||
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');
|
||||
verifyNotEnumerable(cls, 'name');
|
||||
|
@ -36,12 +36,13 @@ info: |
|
||||
GetReferencedName(lref)).
|
||||
|
||||
---*/
|
||||
var xCls, cls;
|
||||
var xCls, cls, xCls2;
|
||||
|
||||
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(xCls2.name !== 'xCls2');
|
||||
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
verifyNotEnumerable(cls, 'name');
|
||||
|
@ -53,9 +53,10 @@ info: |
|
||||
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
|
||||
iterCount += 1;
|
||||
}
|
||||
|
@ -52,9 +52,10 @@ info: |
|
||||
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
|
||||
iterCount += 1;
|
||||
}
|
||||
|
@ -53,9 +53,10 @@ info: |
|
||||
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
|
||||
iterCount += 1;
|
||||
}
|
||||
|
@ -52,9 +52,10 @@ info: |
|
||||
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
|
||||
iterCount += 1;
|
||||
}
|
||||
|
@ -35,12 +35,13 @@ info: |
|
||||
iii. If hasNameProperty is false, perform SetFunctionName(v, P).
|
||||
|
||||
---*/
|
||||
var xCls, cls;
|
||||
var xCls, cls, xCls2;
|
||||
|
||||
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(xCls2.name, 'xCls2');
|
||||
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
verifyNotEnumerable(cls, 'name');
|
||||
|
@ -36,12 +36,13 @@ info: |
|
||||
GetReferencedName(lref)).
|
||||
|
||||
---*/
|
||||
var xCls, cls;
|
||||
var xCls, cls, xCls2;
|
||||
|
||||
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(xCls2.name, 'xCls2');
|
||||
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
verifyNotEnumerable(cls, 'name');
|
||||
|
@ -50,9 +50,10 @@ info: |
|
||||
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
|
||||
iterCount += 1;
|
||||
}
|
||||
|
@ -49,9 +49,10 @@ info: |
|
||||
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
|
||||
iterCount += 1;
|
||||
}
|
||||
|
@ -53,9 +53,10 @@ info: |
|
||||
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
|
||||
iterCount += 1;
|
||||
}
|
||||
|
@ -52,9 +52,10 @@ info: |
|
||||
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
|
||||
iterCount += 1;
|
||||
}
|
||||
|
@ -53,9 +53,10 @@ info: |
|
||||
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
|
||||
iterCount += 1;
|
||||
}
|
||||
|
@ -52,9 +52,10 @@ info: |
|
||||
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
|
||||
iterCount += 1;
|
||||
}
|
||||
|
@ -47,9 +47,10 @@ info: |
|
||||
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
iterCount += 1;
|
||||
}
|
||||
|
||||
|
@ -46,9 +46,10 @@ info: |
|
||||
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
iterCount += 1;
|
||||
}
|
||||
|
||||
|
@ -55,9 +55,10 @@ info: |
|
||||
---*/
|
||||
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
f([]);
|
||||
|
@ -55,9 +55,10 @@ info: |
|
||||
---*/
|
||||
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
f();
|
||||
|
@ -54,9 +54,10 @@ info: |
|
||||
---*/
|
||||
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
f();
|
||||
|
@ -54,9 +54,10 @@ info: |
|
||||
---*/
|
||||
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
f({});
|
||||
|
@ -54,9 +54,10 @@ info: |
|
||||
---*/
|
||||
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
f([]).next();
|
||||
|
@ -54,9 +54,10 @@ info: |
|
||||
---*/
|
||||
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
f().next();
|
||||
|
@ -53,9 +53,10 @@ info: |
|
||||
---*/
|
||||
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
f().next();
|
||||
|
@ -53,9 +53,10 @@ info: |
|
||||
---*/
|
||||
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
f({}).next();
|
||||
|
@ -32,7 +32,8 @@ info: |
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
|
@ -31,7 +31,8 @@ info: |
|
||||
bindingId).
|
||||
---*/
|
||||
|
||||
let { cls = class {}, xCls = class X {} } = {};
|
||||
let { cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } } = {};
|
||||
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
assert.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
|
@ -19,8 +19,10 @@ features: [class]
|
||||
|
||||
let xCls = class x {};
|
||||
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');
|
||||
verifyNotEnumerable(cls, 'name');
|
||||
|
@ -34,9 +34,10 @@ var ranCatch = false;
|
||||
|
||||
try {
|
||||
throw [];
|
||||
} catch ([cls = class {}, xCls = class X {}]) {
|
||||
} catch ([cls = class {}, xCls = class X {}, xCls2 = class { static name() {} }]) {
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
assert.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
ranCatch = true;
|
||||
}
|
||||
|
||||
|
@ -33,9 +33,10 @@ var ranCatch = false;
|
||||
|
||||
try {
|
||||
throw {};
|
||||
} catch ({ cls = class {}, xCls = class X {} }) {
|
||||
} catch ({ cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } }) {
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
assert.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
ranCatch = true;
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,8 @@ info: |
|
||||
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.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
|
@ -30,7 +30,8 @@ info: |
|
||||
bindingId).
|
||||
---*/
|
||||
|
||||
var { cls = class {}, xCls = class X {} } = {};
|
||||
var { cls = class {}, xCls = class X {}, xCls2 = class { static name() {} } } = {};
|
||||
|
||||
assert.sameValue(cls.name, 'cls');
|
||||
assert.notSameValue(xCls.name, 'xCls');
|
||||
assert.notSameValue(xCls2.name, 'xCls2');
|
||||
|
@ -19,8 +19,10 @@ features: [class]
|
||||
|
||||
var xCls = class x {};
|
||||
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');
|
||||
verifyNotEnumerable(cls, 'name');
|
||||
|
Loading…
x
Reference in New Issue
Block a user