mirror of https://github.com/tc39/test262.git
Generate tests
This commit is contained in:
parent
a5505bbf20
commit
c5a1a4a24b
|
@ -61,41 +61,41 @@ info: |
|
|||
|
||||
|
||||
var C = class {
|
||||
*m() { return 42; } static async #$(value) {
|
||||
*m() { return 42; } static async * #$(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #_(value) {
|
||||
static async * #_(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #o(value) {
|
||||
static async * #o(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #℘(value) {
|
||||
static async * #℘(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #ZW__NJ(value) {
|
||||
static async * #ZW__NJ(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #ZW__J(value) {
|
||||
static async * #ZW__J(value) {
|
||||
yield await value;
|
||||
};
|
||||
static async $(value) {
|
||||
yield * await this.#$(value);
|
||||
static get $() {
|
||||
return this.#$;
|
||||
}
|
||||
static async _(value) {
|
||||
yield * await this.#_(value);
|
||||
static get _() {
|
||||
return this.#_;
|
||||
}
|
||||
static async o(value) {
|
||||
yield * await this.#o(value);
|
||||
static get o() {
|
||||
return this.#o;
|
||||
}
|
||||
static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield * await this.#℘(value);
|
||||
static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#℘;
|
||||
}
|
||||
static async ZW__NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield * await this.#ZW__NJ(value);
|
||||
static get ZW__NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__NJ;
|
||||
}
|
||||
static async ZW__J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield * await this.#ZW__J(value);
|
||||
static get ZW__J() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__J;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -62,40 +62,40 @@ info: |
|
|||
|
||||
var C = class {
|
||||
*m() { return 42; } static async * #$(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #_(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #\u{6F}(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #\u2118(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #ZW_\u200C_NJ(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #ZW_\u200D_J(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
};
|
||||
static async * $(value) {
|
||||
yield * await this.#$(value);
|
||||
static async * $() {
|
||||
return this.#$;
|
||||
}
|
||||
static async * _(value) {
|
||||
yield * await this.#_(value);
|
||||
static async * _() {
|
||||
return this.#_;
|
||||
}
|
||||
static async * \u{6F}(value) {
|
||||
yield * await this.#\u{6F}(value);
|
||||
static async * \u{6F}() {
|
||||
return this.#\u{6F};
|
||||
}
|
||||
static async * \u2118(value) {
|
||||
yield * await this.#\u2118(value);
|
||||
static async * \u2118() {
|
||||
return this.#\u2118;
|
||||
}
|
||||
static async * ZW_\u200C_NJ(value) {
|
||||
yield * await this.#ZW_\u200C_NJ(value);
|
||||
static async * ZW_\u200C_NJ() {
|
||||
return this.#ZW_\u200C_NJ;
|
||||
}
|
||||
static async * ZW_\u200D_J(value) {
|
||||
yield * await this.#ZW_\u200D_J(value);
|
||||
static async * ZW_\u200D_J() {
|
||||
return this.#ZW_\u200D_J;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -62,40 +62,40 @@ info: |
|
|||
|
||||
var C = class {
|
||||
*m() { return 42; } static * #$(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #_(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #o(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #℘(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW__NJ(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW__J(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
};
|
||||
static * $(value) {
|
||||
yield this.#$(value);
|
||||
static get $() {
|
||||
return this.#$;
|
||||
}
|
||||
static * _(value) {
|
||||
yield this.#_(value);
|
||||
static get _() {
|
||||
return this.#_;
|
||||
}
|
||||
static * o(value) {
|
||||
yield this.#o(value);
|
||||
static get o() {
|
||||
return this.#o;
|
||||
}
|
||||
static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield this.#℘(value);
|
||||
static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#℘;
|
||||
}
|
||||
static * ZW__NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield this.#ZW__NJ(value);
|
||||
static get ZW__NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__NJ;
|
||||
}
|
||||
static * ZW__J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield this.#ZW__J(value);
|
||||
static get ZW__J() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__J;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -62,40 +62,40 @@ info: |
|
|||
|
||||
var C = class {
|
||||
*m() { return 42; } static * #$(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #_(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #\u{6F}(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #\u2118(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW_\u200C_NJ(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW_\u200D_J(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
};
|
||||
static * $(value) {
|
||||
yield this.#$(value);
|
||||
static get $() {
|
||||
return this.#$;
|
||||
}
|
||||
static * _(value) {
|
||||
yield this.#_(value);
|
||||
static get _() {
|
||||
return this.#_;
|
||||
}
|
||||
static * \u{6F}(value) {
|
||||
yield this.#\u{6F}(value);
|
||||
static get \u{6F}() {
|
||||
return this.#\u{6F};
|
||||
}
|
||||
static * \u2118(value) {
|
||||
yield this.#\u2118(value);
|
||||
static get \u2118() {
|
||||
return this.#\u2118;
|
||||
}
|
||||
static * ZW_\u200C_NJ(value) {
|
||||
yield this.#ZW_\u200C_NJ(value);
|
||||
static get ZW_\u200C_NJ() {
|
||||
return this.#ZW_\u200C_NJ;
|
||||
}
|
||||
static * ZW_\u200D_J(value) {
|
||||
yield this.#ZW_\u200D_J(value);
|
||||
static get ZW_\u200D_J() {
|
||||
return this.#ZW_\u200D_J;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,83 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-private-methods-with-fields.case
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-gen.template
|
||||
/*---
|
||||
description: static private methods with fields (field definitions after a generator in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
features: [class-static-methods-private, class-static-fields-private, generators, class, class-fields-public]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement :
|
||||
...
|
||||
static FieldDefinition ;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName :
|
||||
PrivateName
|
||||
|
||||
PrivateName :
|
||||
# IdentifierName
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var C = class {
|
||||
*m() { return 42; } static #xVal; static #yVal;
|
||||
static #x(value) {
|
||||
this.#xVal = value;
|
||||
return this.#xVal;
|
||||
}
|
||||
static #y(value) {
|
||||
this.#yVal = value;
|
||||
return this.#yVal;
|
||||
}
|
||||
static x() {
|
||||
return this.#x(42);
|
||||
}
|
||||
static y() {
|
||||
return this.#y(43);
|
||||
}
|
||||
}
|
||||
|
||||
var c = new C();
|
||||
|
||||
assert.sameValue(c.m().next().value, 42);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "m"), false);
|
||||
assert.sameValue(c.m, C.prototype.m);
|
||||
|
||||
verifyProperty(C.prototype, "m", {
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
});
|
||||
|
||||
// Test the private methods do not appear as properties before set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#xVal"), false, "test 7");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#xVal"), false, "test 8");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#xVal"), false, "test 9");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#yVal"), false, "test 10");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#yVal"), false, "test 11");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#yVal"), false, "test 12");
|
||||
|
||||
// Test if private fields can be sucessfully accessed and set to value
|
||||
assert.sameValue(C.x(), 42, "test 13");
|
||||
assert.sameValue(C.y(), 43, "test 14");
|
||||
|
||||
// Test the private fields do not appear as properties before after set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 15");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 16");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#xVal"), false, "test 17");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#yVal"), false, "test 18");
|
|
@ -25,17 +25,15 @@ info: |
|
|||
|
||||
|
||||
var C = class {
|
||||
*m() { return 42; } static #xVal; static #yVal;
|
||||
*m() { return 42; } ;
|
||||
static #x(value) {
|
||||
this.#xVal = value;
|
||||
return this.#xVal;
|
||||
return value / 2;
|
||||
}
|
||||
static #y(value) {
|
||||
this.#y = value;
|
||||
return this.#yVal;
|
||||
return value * 2;
|
||||
}
|
||||
static x() {
|
||||
return this.#x(42);
|
||||
return this.#x(84);
|
||||
}
|
||||
static y() {
|
||||
return this.#y(43);
|
||||
|
@ -55,18 +53,18 @@ verifyProperty(C.prototype, "m", {
|
|||
});
|
||||
|
||||
// Test the private methods do not appear as properties before set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#xVal"), false, "test 1");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#xVal"), false, "test 2");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#xVal"), false, "test 3");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#yVal"), false, "test 4");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#yVal"), false, "test 5");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#yVal"), false, "test 6");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6");
|
||||
|
||||
// Test if private fields can be sucessfully accessed and set to value
|
||||
assert.sameValue(C.x(), 42, "test 7");
|
||||
assert.sameValue(C.y(), 43, "test 8");
|
||||
assert.sameValue(C.y(), 86, "test 8");
|
||||
|
||||
// Test the private fields do not appear as properties before after set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#xVal"), false, "test 9");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#yVal"), false, "test 10");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10");
|
||||
|
|
|
@ -61,41 +61,41 @@ info: |
|
|||
|
||||
|
||||
var C = class {
|
||||
m() { return 42; } static async #$(value) {
|
||||
m() { return 42; } static async * #$(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #_(value) {
|
||||
static async * #_(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #o(value) {
|
||||
static async * #o(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #℘(value) {
|
||||
static async * #℘(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #ZW__NJ(value) {
|
||||
static async * #ZW__NJ(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #ZW__J(value) {
|
||||
static async * #ZW__J(value) {
|
||||
yield await value;
|
||||
};
|
||||
static async $(value) {
|
||||
yield * await this.#$(value);
|
||||
static get $() {
|
||||
return this.#$;
|
||||
}
|
||||
static async _(value) {
|
||||
yield * await this.#_(value);
|
||||
static get _() {
|
||||
return this.#_;
|
||||
}
|
||||
static async o(value) {
|
||||
yield * await this.#o(value);
|
||||
static get o() {
|
||||
return this.#o;
|
||||
}
|
||||
static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield * await this.#℘(value);
|
||||
static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#℘;
|
||||
}
|
||||
static async ZW__NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield * await this.#ZW__NJ(value);
|
||||
static get ZW__NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__NJ;
|
||||
}
|
||||
static async ZW__J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield * await this.#ZW__J(value);
|
||||
static get ZW__J() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__J;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -62,40 +62,40 @@ info: |
|
|||
|
||||
var C = class {
|
||||
m() { return 42; } static async * #$(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #_(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #\u{6F}(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #\u2118(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #ZW_\u200C_NJ(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #ZW_\u200D_J(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
};
|
||||
static async * $(value) {
|
||||
yield * await this.#$(value);
|
||||
static async * $() {
|
||||
return this.#$;
|
||||
}
|
||||
static async * _(value) {
|
||||
yield * await this.#_(value);
|
||||
static async * _() {
|
||||
return this.#_;
|
||||
}
|
||||
static async * \u{6F}(value) {
|
||||
yield * await this.#\u{6F}(value);
|
||||
static async * \u{6F}() {
|
||||
return this.#\u{6F};
|
||||
}
|
||||
static async * \u2118(value) {
|
||||
yield * await this.#\u2118(value);
|
||||
static async * \u2118() {
|
||||
return this.#\u2118;
|
||||
}
|
||||
static async * ZW_\u200C_NJ(value) {
|
||||
yield * await this.#ZW_\u200C_NJ(value);
|
||||
static async * ZW_\u200C_NJ() {
|
||||
return this.#ZW_\u200C_NJ;
|
||||
}
|
||||
static async * ZW_\u200D_J(value) {
|
||||
yield * await this.#ZW_\u200D_J(value);
|
||||
static async * ZW_\u200D_J() {
|
||||
return this.#ZW_\u200D_J;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -62,40 +62,40 @@ info: |
|
|||
|
||||
var C = class {
|
||||
m() { return 42; } static * #$(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #_(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #o(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #℘(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW__NJ(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW__J(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
};
|
||||
static * $(value) {
|
||||
yield this.#$(value);
|
||||
static get $() {
|
||||
return this.#$;
|
||||
}
|
||||
static * _(value) {
|
||||
yield this.#_(value);
|
||||
static get _() {
|
||||
return this.#_;
|
||||
}
|
||||
static * o(value) {
|
||||
yield this.#o(value);
|
||||
static get o() {
|
||||
return this.#o;
|
||||
}
|
||||
static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield this.#℘(value);
|
||||
static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#℘;
|
||||
}
|
||||
static * ZW__NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield this.#ZW__NJ(value);
|
||||
static get ZW__NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__NJ;
|
||||
}
|
||||
static * ZW__J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield this.#ZW__J(value);
|
||||
static get ZW__J() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__J;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -62,40 +62,40 @@ info: |
|
|||
|
||||
var C = class {
|
||||
m() { return 42; } static * #$(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #_(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #\u{6F}(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #\u2118(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW_\u200C_NJ(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW_\u200D_J(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
};
|
||||
static * $(value) {
|
||||
yield this.#$(value);
|
||||
static get $() {
|
||||
return this.#$;
|
||||
}
|
||||
static * _(value) {
|
||||
yield this.#_(value);
|
||||
static get _() {
|
||||
return this.#_;
|
||||
}
|
||||
static * \u{6F}(value) {
|
||||
yield this.#\u{6F}(value);
|
||||
static get \u{6F}() {
|
||||
return this.#\u{6F};
|
||||
}
|
||||
static * \u2118(value) {
|
||||
yield this.#\u2118(value);
|
||||
static get \u2118() {
|
||||
return this.#\u2118;
|
||||
}
|
||||
static * ZW_\u200C_NJ(value) {
|
||||
yield this.#ZW_\u200C_NJ(value);
|
||||
static get ZW_\u200C_NJ() {
|
||||
return this.#ZW_\u200C_NJ;
|
||||
}
|
||||
static * ZW_\u200D_J(value) {
|
||||
yield this.#ZW_\u200D_J(value);
|
||||
static get ZW_\u200D_J() {
|
||||
return this.#ZW_\u200D_J;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,83 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-private-methods-with-fields.case
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-method.template
|
||||
/*---
|
||||
description: static private methods with fields (field definitions after a method in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
features: [class-static-methods-private, class-static-fields-private, class, class-fields-public]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement :
|
||||
...
|
||||
static FieldDefinition ;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName :
|
||||
PrivateName
|
||||
|
||||
PrivateName :
|
||||
# IdentifierName
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var C = class {
|
||||
m() { return 42; } static #xVal; static #yVal;
|
||||
static #x(value) {
|
||||
this.#xVal = value;
|
||||
return this.#xVal;
|
||||
}
|
||||
static #y(value) {
|
||||
this.#yVal = value;
|
||||
return this.#yVal;
|
||||
}
|
||||
static x() {
|
||||
return this.#x(42);
|
||||
}
|
||||
static y() {
|
||||
return this.#y(43);
|
||||
}
|
||||
}
|
||||
|
||||
var c = new C();
|
||||
|
||||
assert.sameValue(c.m(), 42);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "m"), false);
|
||||
assert.sameValue(c.m, C.prototype.m);
|
||||
|
||||
verifyProperty(C.prototype, "m", {
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
});
|
||||
|
||||
// Test the private methods do not appear as properties before set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#xVal"), false, "test 7");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#xVal"), false, "test 8");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#xVal"), false, "test 9");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#yVal"), false, "test 10");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#yVal"), false, "test 11");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#yVal"), false, "test 12");
|
||||
|
||||
// Test if private fields can be sucessfully accessed and set to value
|
||||
assert.sameValue(C.x(), 42, "test 13");
|
||||
assert.sameValue(C.y(), 43, "test 14");
|
||||
|
||||
// Test the private fields do not appear as properties before after set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 15");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 16");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#xVal"), false, "test 17");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#yVal"), false, "test 18");
|
|
@ -25,17 +25,15 @@ info: |
|
|||
|
||||
|
||||
var C = class {
|
||||
m() { return 42; } static #xVal; static #yVal;
|
||||
m() { return 42; } ;
|
||||
static #x(value) {
|
||||
this.#xVal = value;
|
||||
return this.#xVal;
|
||||
return value / 2;
|
||||
}
|
||||
static #y(value) {
|
||||
this.#y = value;
|
||||
return this.#yVal;
|
||||
return value * 2;
|
||||
}
|
||||
static x() {
|
||||
return this.#x(42);
|
||||
return this.#x(84);
|
||||
}
|
||||
static y() {
|
||||
return this.#y(43);
|
||||
|
@ -55,18 +53,18 @@ verifyProperty(C.prototype, "m", {
|
|||
});
|
||||
|
||||
// Test the private methods do not appear as properties before set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#xVal"), false, "test 1");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#xVal"), false, "test 2");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#xVal"), false, "test 3");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#yVal"), false, "test 4");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#yVal"), false, "test 5");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#yVal"), false, "test 6");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6");
|
||||
|
||||
// Test if private fields can be sucessfully accessed and set to value
|
||||
assert.sameValue(C.x(), 42, "test 7");
|
||||
assert.sameValue(C.y(), 43, "test 8");
|
||||
assert.sameValue(C.y(), 86, "test 8");
|
||||
|
||||
// Test the private fields do not appear as properties before after set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#xVal"), false, "test 9");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#yVal"), false, "test 10");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10");
|
||||
|
|
|
@ -39,41 +39,51 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "b"), false);
|
||||
|
||||
verifyProperty(c, "b", {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "x"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "x"), false);
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "10"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "10"), false);
|
||||
|
||||
verifyProperty(c, "10", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "not initialized"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "not initialized"), false);
|
||||
|
||||
verifyProperty(c, "not initialized", {
|
||||
value: undefined,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
C.m().next().then(function(v) {
|
||||
assert.sameValue(v.value, 42);
|
||||
assert.sameValue(v.done, true);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "b"), false);
|
||||
|
||||
verifyProperty(c, "b", {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "x"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "x"), false);
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "10"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "10"), false);
|
||||
|
||||
verifyProperty(c, "10", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "not initialized"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "not initialized"), false);
|
||||
|
||||
verifyProperty(c, "not initialized", {
|
||||
value: undefined,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -40,35 +40,45 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, x), false);
|
||||
|
||||
verifyProperty(c, x, {
|
||||
value: undefined,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, y), false);
|
||||
|
||||
verifyProperty(c, y, {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "x"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "x"), false);
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "y"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "y"), false);
|
||||
|
||||
C.m().next().then(function(v) {
|
||||
assert.sameValue(v.value, 42);
|
||||
assert.sameValue(v.done, true);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, x), false);
|
||||
|
||||
verifyProperty(c, x, {
|
||||
value: undefined,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, y), false);
|
||||
|
||||
verifyProperty(c, y, {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "x"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "x"), false);
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "y"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "y"), false);
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -98,12 +98,22 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(c.o(1), 1);
|
||||
assert.sameValue(c.℘(1), 1);
|
||||
assert.sameValue(c.ZW__NJ(1), 1);
|
||||
assert.sameValue(c.ZW__J(1), 1);
|
||||
|
||||
C.m().next().then(function(v) {
|
||||
assert.sameValue(v.value, 42);
|
||||
assert.sameValue(v.done, true);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(c.o(1), 1);
|
||||
assert.sameValue(c.℘(1), 1);
|
||||
assert.sameValue(c.ZW__NJ(1), 1);
|
||||
assert.sameValue(c.ZW__J(1), 1);
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -40,38 +40,48 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "a"), false);
|
||||
|
||||
verifyProperty(c, "a", {
|
||||
value: undefined,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "b"), false);
|
||||
|
||||
verifyProperty(c, "b", {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "c"), false);
|
||||
|
||||
verifyProperty(c, "c", {
|
||||
value: fn,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
|
||||
C.m().next().then(function(v) {
|
||||
assert.sameValue(v.value, 42);
|
||||
assert.sameValue(v.done, true);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "a"), false);
|
||||
|
||||
verifyProperty(c, "a", {
|
||||
value: undefined,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "b"), false);
|
||||
|
||||
verifyProperty(c, "b", {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "c"), false);
|
||||
|
||||
verifyProperty(c, "c", {
|
||||
value: fn,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -47,24 +47,34 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
// Test the private fields do not appear as properties before set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6");
|
||||
|
||||
// Test if private fields can be sucessfully accessed and set to value
|
||||
assert.sameValue(c.x(), 42, "test 7");
|
||||
assert.sameValue(c.y(), 43, "test 8");
|
||||
|
||||
// Test the private fields do not appear as properties before after set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 9");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 10");
|
||||
|
||||
C.m().next().then(function(v) {
|
||||
assert.sameValue(v.value, 42);
|
||||
assert.sameValue(v.done, true);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
// Test the private fields do not appear as properties before set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6");
|
||||
|
||||
// Test if private fields can be sucessfully accessed and set to value
|
||||
assert.sameValue(c.x(), 42, "test 7");
|
||||
assert.sameValue(c.y(), 43, "test 8");
|
||||
|
||||
// Test the private fields do not appear as properties before after set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 9");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 10");
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -74,14 +74,24 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(c.$, 1);
|
||||
assert.sameValue(c._, 1);
|
||||
assert.sameValue(c.\u{6F}, 1);
|
||||
assert.sameValue(c.\u2118, 1);
|
||||
assert.sameValue(c.ZW_\u200C_NJ, 1);
|
||||
assert.sameValue(c.ZW_\u200D_J, 1);
|
||||
|
||||
C.m().next().then(function(v) {
|
||||
assert.sameValue(v.value, 42);
|
||||
assert.sameValue(v.done, true);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(c.$, 1);
|
||||
assert.sameValue(c._, 1);
|
||||
assert.sameValue(c.\u{6F}, 1);
|
||||
assert.sameValue(c.\u2118, 1);
|
||||
assert.sameValue(c.ZW_\u200C_NJ, 1);
|
||||
assert.sameValue(c.ZW_\u200D_J, 1);
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -74,21 +74,31 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
c.$ = 1;
|
||||
c._ = 1;
|
||||
c.\u{6F} = 1;
|
||||
c.\u2118 = 1;
|
||||
c.ZW_\u200C_NJ = 1;
|
||||
c.ZW_\u200D_J = 1;
|
||||
|
||||
assert.sameValue(c.$, 1);
|
||||
assert.sameValue(c._, 1);
|
||||
assert.sameValue(c.\u{6F}, 1);
|
||||
assert.sameValue(c.\u2118, 1);
|
||||
assert.sameValue(c.ZW_\u200C_NJ, 1);
|
||||
assert.sameValue(c.ZW_\u200D_J, 1);
|
||||
|
||||
C.m().next().then(function(v) {
|
||||
assert.sameValue(v.value, 42);
|
||||
assert.sameValue(v.done, true);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
c.$ = 1;
|
||||
c._ = 1;
|
||||
c.\u{6F} = 1;
|
||||
c.\u2118 = 1;
|
||||
c.ZW_\u200C_NJ = 1;
|
||||
c.ZW_\u200D_J = 1;
|
||||
|
||||
assert.sameValue(c.$, 1);
|
||||
assert.sameValue(c._, 1);
|
||||
assert.sameValue(c.\u{6F}, 1);
|
||||
assert.sameValue(c.\u2118, 1);
|
||||
assert.sameValue(c.ZW_\u200C_NJ, 1);
|
||||
assert.sameValue(c.ZW_\u200D_J, 1);
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -95,15 +95,25 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(c.$(1), 1);
|
||||
assert.sameValue(c._(1), 1);
|
||||
assert.sameValue(c.\u{6F}(1), 1);
|
||||
assert.sameValue(c.℘(1), 1);
|
||||
assert.sameValue(c.ZW__NJ(1), 1);
|
||||
assert.sameValue(c.ZW__J(1), 1);
|
||||
|
||||
|
||||
C.m().next().then(function(v) {
|
||||
assert.sameValue(v.value, 42);
|
||||
assert.sameValue(v.done, true);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(c.$(1), 1);
|
||||
assert.sameValue(c._(1), 1);
|
||||
assert.sameValue(c.\u{6F}(1), 1);
|
||||
assert.sameValue(c.℘(1), 1);
|
||||
assert.sameValue(c.ZW__NJ(1), 1);
|
||||
assert.sameValue(c.ZW__J(1), 1);
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -89,15 +89,25 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(c.$(), 1);
|
||||
assert.sameValue(c._(), 1);
|
||||
assert.sameValue(c.\u{6F}(), 1);
|
||||
assert.sameValue(c.℘(), 1);
|
||||
assert.sameValue(c.ZW__NJ(), 1);
|
||||
assert.sameValue(c.ZW__J(), 1);
|
||||
|
||||
|
||||
C.m().next().then(function(v) {
|
||||
assert.sameValue(v.value, 42);
|
||||
assert.sameValue(v.done, true);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(c.$(), 1);
|
||||
assert.sameValue(c._(), 1);
|
||||
assert.sameValue(c.\u{6F}(), 1);
|
||||
assert.sameValue(c.℘(), 1);
|
||||
assert.sameValue(c.ZW__NJ(), 1);
|
||||
assert.sameValue(c.ZW__J(), 1);
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -89,15 +89,25 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(c.$(), 1);
|
||||
assert.sameValue(c._(), 1);
|
||||
assert.sameValue(c.\u{6F}(), 1);
|
||||
assert.sameValue(c.\u2118(), 1);
|
||||
assert.sameValue(c.ZW_\u200C_NJ(), 1);
|
||||
assert.sameValue(c.ZW_\u200D_J(), 1);
|
||||
|
||||
|
||||
C.m().next().then(function(v) {
|
||||
assert.sameValue(v.value, 42);
|
||||
assert.sameValue(v.done, true);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(c.$(), 1);
|
||||
assert.sameValue(c._(), 1);
|
||||
assert.sameValue(c.\u{6F}(), 1);
|
||||
assert.sameValue(c.\u2118(), 1);
|
||||
assert.sameValue(c.ZW_\u200C_NJ(), 1);
|
||||
assert.sameValue(c.ZW_\u200D_J(), 1);
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -95,15 +95,25 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(c.$(1), 1);
|
||||
assert.sameValue(c._(1), 1);
|
||||
assert.sameValue(c.\u{6F}(1), 1);
|
||||
assert.sameValue(c.\u2118(1), 1);
|
||||
assert.sameValue(c.ZW_\u200C_NJ(1), 1);
|
||||
assert.sameValue(c.ZW_\u200D_J(1), 1);
|
||||
|
||||
|
||||
C.m().next().then(function(v) {
|
||||
assert.sameValue(v.value, 42);
|
||||
assert.sameValue(v.done, true);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(c.$(1), 1);
|
||||
assert.sameValue(c._(1), 1);
|
||||
assert.sameValue(c.\u{6F}(1), 1);
|
||||
assert.sameValue(c.\u2118(1), 1);
|
||||
assert.sameValue(c.ZW_\u200C_NJ(1), 1);
|
||||
assert.sameValue(c.ZW_\u200D_J(1), 1);
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -61,41 +61,41 @@ info: |
|
|||
|
||||
|
||||
var C = class {
|
||||
static async *m() { return 42; } static async #$(value) {
|
||||
static async *m() { return 42; } static async * #$(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #_(value) {
|
||||
static async * #_(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #o(value) {
|
||||
static async * #o(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #℘(value) {
|
||||
static async * #℘(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #ZW__NJ(value) {
|
||||
static async * #ZW__NJ(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #ZW__J(value) {
|
||||
static async * #ZW__J(value) {
|
||||
yield await value;
|
||||
};
|
||||
static async $(value) {
|
||||
yield * await this.#$(value);
|
||||
static get $() {
|
||||
return this.#$;
|
||||
}
|
||||
static async _(value) {
|
||||
yield * await this.#_(value);
|
||||
static get _() {
|
||||
return this.#_;
|
||||
}
|
||||
static async o(value) {
|
||||
yield * await this.#o(value);
|
||||
static get o() {
|
||||
return this.#o;
|
||||
}
|
||||
static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield * await this.#℘(value);
|
||||
static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#℘;
|
||||
}
|
||||
static async ZW__NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield * await this.#ZW__NJ(value);
|
||||
static get ZW__NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__NJ;
|
||||
}
|
||||
static async ZW__J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield * await this.#ZW__J(value);
|
||||
static get ZW__J() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__J;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -111,25 +111,35 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
Promise.all([
|
||||
C.$(1).next(),
|
||||
C._(1).next(),
|
||||
C.o(1).next(),
|
||||
C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
C.ZW__NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
C.ZW__J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
]).then(results => {
|
||||
|
||||
assert.sameValue(results[0].value, 1);
|
||||
assert.sameValue(results[1].value, 1);
|
||||
assert.sameValue(results[2].value, 1);
|
||||
assert.sameValue(results[3].value, 1);
|
||||
assert.sameValue(results[4].value, 1);
|
||||
assert.sameValue(results[5].value, 1);
|
||||
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
||||
C.m().next().then(function(v) {
|
||||
assert.sameValue(v.value, 42);
|
||||
assert.sameValue(v.done, true);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
Promise.all([
|
||||
C.$(1).next(),
|
||||
C._(1).next(),
|
||||
C.o(1).next(),
|
||||
C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
C.ZW__NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
C.ZW__J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
]).then(results => {
|
||||
|
||||
assert.sameValue(results[0].value, 1);
|
||||
assert.sameValue(results[1].value, 1);
|
||||
assert.sameValue(results[2].value, 1);
|
||||
assert.sameValue(results[3].value, 1);
|
||||
assert.sameValue(results[4].value, 1);
|
||||
assert.sameValue(results[5].value, 1);
|
||||
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -62,40 +62,40 @@ info: |
|
|||
|
||||
var C = class {
|
||||
static async *m() { return 42; } static async * #$(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #_(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #\u{6F}(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #\u2118(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #ZW_\u200C_NJ(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #ZW_\u200D_J(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
};
|
||||
static async * $(value) {
|
||||
yield * await this.#$(value);
|
||||
static async * $() {
|
||||
return this.#$;
|
||||
}
|
||||
static async * _(value) {
|
||||
yield * await this.#_(value);
|
||||
static async * _() {
|
||||
return this.#_;
|
||||
}
|
||||
static async * \u{6F}(value) {
|
||||
yield * await this.#\u{6F}(value);
|
||||
static async * \u{6F}() {
|
||||
return this.#\u{6F};
|
||||
}
|
||||
static async * \u2118(value) {
|
||||
yield * await this.#\u2118(value);
|
||||
static async * \u2118() {
|
||||
return this.#\u2118;
|
||||
}
|
||||
static async * ZW_\u200C_NJ(value) {
|
||||
yield * await this.#ZW_\u200C_NJ(value);
|
||||
static async * ZW_\u200C_NJ() {
|
||||
return this.#ZW_\u200C_NJ;
|
||||
}
|
||||
static async * ZW_\u200D_J(value) {
|
||||
yield * await this.#ZW_\u200D_J(value);
|
||||
static async * ZW_\u200D_J() {
|
||||
return this.#ZW_\u200D_J;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -111,26 +111,36 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
Promise.all([
|
||||
C.$(1).next(),
|
||||
C._(1).next(),
|
||||
C.\u{6F}(1).next(),
|
||||
C.\u2118(1).next(),
|
||||
C.ZW_\u200C_NJ(1).next(),
|
||||
C.ZW_\u200D_J(1).next(),
|
||||
]).then(results => {
|
||||
|
||||
assert.sameValue(results[0].value, 1);
|
||||
assert.sameValue(results[1].value, 1);
|
||||
assert.sameValue(results[2].value, 1);
|
||||
assert.sameValue(results[3].value, 1);
|
||||
assert.sameValue(results[4].value, 1);
|
||||
assert.sameValue(results[5].value, 1);
|
||||
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
||||
|
||||
C.m().next().then(function(v) {
|
||||
assert.sameValue(v.value, 42);
|
||||
assert.sameValue(v.done, true);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
Promise.all([
|
||||
C.$(1).next(),
|
||||
C._(1).next(),
|
||||
C.\u{6F}(1).next(),
|
||||
C.\u2118(1).next(),
|
||||
C.ZW_\u200C_NJ(1).next(),
|
||||
C.ZW_\u200D_J(1).next(),
|
||||
]).then(results => {
|
||||
|
||||
assert.sameValue(results[0].value, 1);
|
||||
assert.sameValue(results[1].value, 1);
|
||||
assert.sameValue(results[2].value, 1);
|
||||
assert.sameValue(results[3].value, 1);
|
||||
assert.sameValue(results[4].value, 1);
|
||||
assert.sameValue(results[5].value, 1);
|
||||
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -111,25 +111,35 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
Promise.all([
|
||||
C.$(1),
|
||||
C._(1),
|
||||
C.o(1),
|
||||
C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
C.ZW__NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
C.ZW__J(1), // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
]).then(results => {
|
||||
|
||||
assert.sameValue(results[0], 1);
|
||||
assert.sameValue(results[1], 1);
|
||||
assert.sameValue(results[2], 1);
|
||||
assert.sameValue(results[3], 1);
|
||||
assert.sameValue(results[4], 1);
|
||||
assert.sameValue(results[5], 1);
|
||||
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
||||
C.m().next().then(function(v) {
|
||||
assert.sameValue(v.value, 42);
|
||||
assert.sameValue(v.done, true);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
Promise.all([
|
||||
C.$(1),
|
||||
C._(1),
|
||||
C.o(1),
|
||||
C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
C.ZW__NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
C.ZW__J(1), // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
]).then(results => {
|
||||
|
||||
assert.sameValue(results[0], 1);
|
||||
assert.sameValue(results[1], 1);
|
||||
assert.sameValue(results[2], 1);
|
||||
assert.sameValue(results[3], 1);
|
||||
assert.sameValue(results[4], 1);
|
||||
assert.sameValue(results[5], 1);
|
||||
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -111,26 +111,36 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
Promise.all([
|
||||
C.$(1),
|
||||
C._(1),
|
||||
C.\u{6F}(1),
|
||||
C.\u2118(1),
|
||||
C.ZW_\u200C_NJ(1),
|
||||
C.ZW_\u200D_J(1),
|
||||
]).then(results => {
|
||||
|
||||
assert.sameValue(results[0], 1);
|
||||
assert.sameValue(results[1], 1);
|
||||
assert.sameValue(results[2], 1);
|
||||
assert.sameValue(results[3], 1);
|
||||
assert.sameValue(results[4], 1);
|
||||
assert.sameValue(results[5], 1);
|
||||
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
||||
|
||||
C.m().next().then(function(v) {
|
||||
assert.sameValue(v.value, 42);
|
||||
assert.sameValue(v.done, true);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
Promise.all([
|
||||
C.$(1),
|
||||
C._(1),
|
||||
C.\u{6F}(1),
|
||||
C.\u2118(1),
|
||||
C.ZW_\u200C_NJ(1),
|
||||
C.ZW_\u200D_J(1),
|
||||
]).then(results => {
|
||||
|
||||
assert.sameValue(results[0], 1);
|
||||
assert.sameValue(results[1], 1);
|
||||
assert.sameValue(results[2], 1);
|
||||
assert.sameValue(results[3], 1);
|
||||
assert.sameValue(results[4], 1);
|
||||
assert.sameValue(results[5], 1);
|
||||
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -62,40 +62,40 @@ info: |
|
|||
|
||||
var C = class {
|
||||
static async *m() { return 42; } static * #$(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #_(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #o(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #℘(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW__NJ(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW__J(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
};
|
||||
static * $(value) {
|
||||
yield this.#$(value);
|
||||
static get $() {
|
||||
return this.#$;
|
||||
}
|
||||
static * _(value) {
|
||||
yield this.#_(value);
|
||||
static get _() {
|
||||
return this.#_;
|
||||
}
|
||||
static * o(value) {
|
||||
yield this.#o(value);
|
||||
static get o() {
|
||||
return this.#o;
|
||||
}
|
||||
static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield this.#℘(value);
|
||||
static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#℘;
|
||||
}
|
||||
static * ZW__NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield this.#ZW__NJ(value);
|
||||
static get ZW__NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__NJ;
|
||||
}
|
||||
static * ZW__J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield this.#ZW__J(value);
|
||||
static get ZW__J() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__J;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -111,14 +111,24 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(C.$(1).next().value, 1);
|
||||
assert.sameValue(C._(1).next().value, 1);
|
||||
assert.sameValue(C.o(1).next().value, 1);
|
||||
assert.sameValue(C.℘(1).next().value, 1);
|
||||
assert.sameValue(C.ZW__NJ(1).next().value, 1);
|
||||
assert.sameValue(C.ZW__J(1).next().value, 1);
|
||||
|
||||
C.m().next().then(function(v) {
|
||||
assert.sameValue(v.value, 42);
|
||||
assert.sameValue(v.done, true);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(C.$(1).next().value, 1);
|
||||
assert.sameValue(C._(1).next().value, 1);
|
||||
assert.sameValue(C.o(1).next().value, 1);
|
||||
assert.sameValue(C.℘(1).next().value, 1);
|
||||
assert.sameValue(C.ZW__NJ(1).next().value, 1);
|
||||
assert.sameValue(C.ZW__J(1).next().value, 1);
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -62,40 +62,40 @@ info: |
|
|||
|
||||
var C = class {
|
||||
static async *m() { return 42; } static * #$(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #_(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #\u{6F}(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #\u2118(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW_\u200C_NJ(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW_\u200D_J(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
};
|
||||
static * $(value) {
|
||||
yield this.#$(value);
|
||||
static get $() {
|
||||
return this.#$;
|
||||
}
|
||||
static * _(value) {
|
||||
yield this.#_(value);
|
||||
static get _() {
|
||||
return this.#_;
|
||||
}
|
||||
static * \u{6F}(value) {
|
||||
yield this.#\u{6F}(value);
|
||||
static get \u{6F}() {
|
||||
return this.#\u{6F};
|
||||
}
|
||||
static * \u2118(value) {
|
||||
yield this.#\u2118(value);
|
||||
static get \u2118() {
|
||||
return this.#\u2118;
|
||||
}
|
||||
static * ZW_\u200C_NJ(value) {
|
||||
yield this.#ZW_\u200C_NJ(value);
|
||||
static get ZW_\u200C_NJ() {
|
||||
return this.#ZW_\u200C_NJ;
|
||||
}
|
||||
static * ZW_\u200D_J(value) {
|
||||
yield this.#ZW_\u200D_J(value);
|
||||
static get ZW_\u200D_J() {
|
||||
return this.#ZW_\u200D_J;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -111,15 +111,25 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(C.$(1).next().value, 1);
|
||||
assert.sameValue(C._(1).next().value, 1);
|
||||
assert.sameValue(C.\u{6F}(1).next().value, 1);
|
||||
assert.sameValue(C.\u2118(1).next().value, 1);
|
||||
assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1);
|
||||
assert.sameValue(C.ZW_\u200D_J(1).next().value, 1);
|
||||
|
||||
|
||||
C.m().next().then(function(v) {
|
||||
assert.sameValue(v.value, 42);
|
||||
assert.sameValue(v.done, true);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(C.$(1).next().value, 1);
|
||||
assert.sameValue(C._(1).next().value, 1);
|
||||
assert.sameValue(C.\u{6F}(1).next().value, 1);
|
||||
assert.sameValue(C.\u2118(1).next().value, 1);
|
||||
assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1);
|
||||
assert.sameValue(C.ZW_\u200D_J(1).next().value, 1);
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -108,15 +108,25 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(C.$(1), 1);
|
||||
assert.sameValue(C._(1), 1);
|
||||
assert.sameValue(C.o(1), 1);
|
||||
assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
assert.sameValue(C.ZW__NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
assert.sameValue(C.ZW__J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
|
||||
|
||||
C.m().next().then(function(v) {
|
||||
assert.sameValue(v.value, 42);
|
||||
assert.sameValue(v.done, true);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(C.$(1), 1);
|
||||
assert.sameValue(C._(1), 1);
|
||||
assert.sameValue(C.o(1), 1);
|
||||
assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
assert.sameValue(C.ZW__NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
assert.sameValue(C.ZW__J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -108,15 +108,25 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(C.$(1), 1);
|
||||
assert.sameValue(C._(1), 1);
|
||||
assert.sameValue(C.\u{6F}(1), 1);
|
||||
assert.sameValue(C.\u2118(1), 1);
|
||||
assert.sameValue(C.ZW_\u200C_NJ(1), 1);
|
||||
assert.sameValue(C.ZW_\u200D_J(1), 1);
|
||||
|
||||
|
||||
C.m().next().then(function(v) {
|
||||
assert.sameValue(v.value, 42);
|
||||
assert.sameValue(v.done, true);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(C.$(1), 1);
|
||||
assert.sameValue(C._(1), 1);
|
||||
assert.sameValue(C.\u{6F}(1), 1);
|
||||
assert.sameValue(C.\u2118(1), 1);
|
||||
assert.sameValue(C.ZW_\u200C_NJ(1), 1);
|
||||
assert.sameValue(C.ZW_\u200D_J(1), 1);
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -96,15 +96,25 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(C.$(1), 1);
|
||||
assert.sameValue(C._(1), 1);
|
||||
assert.sameValue(C.o(1), 1);
|
||||
assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
assert.sameValue(C.ZW__NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
assert.sameValue(C.ZW__J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
|
||||
|
||||
C.m().next().then(function(v) {
|
||||
assert.sameValue(v.value, 42);
|
||||
assert.sameValue(v.done, true);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(C.$(1), 1);
|
||||
assert.sameValue(C._(1), 1);
|
||||
assert.sameValue(C.o(1), 1);
|
||||
assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
assert.sameValue(C.ZW__NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
assert.sameValue(C.ZW__J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -96,15 +96,25 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(C.$(1), 1);
|
||||
assert.sameValue(C._(1), 1);
|
||||
assert.sameValue(C.o(1), 1);
|
||||
assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
assert.sameValue(C.ZW__NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
assert.sameValue(C.ZW__J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
|
||||
|
||||
C.m().next().then(function(v) {
|
||||
assert.sameValue(v.value, 42);
|
||||
assert.sameValue(v.done, true);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(C.$(1), 1);
|
||||
assert.sameValue(C._(1), 1);
|
||||
assert.sameValue(C.o(1), 1);
|
||||
assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
assert.sameValue(C.ZW__NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
assert.sameValue(C.ZW__J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -96,15 +96,25 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(C.$(1), 1);
|
||||
assert.sameValue(C._(1), 1);
|
||||
assert.sameValue(C.\u{6F}(1), 1);
|
||||
assert.sameValue(C.\u2118(1), 1);
|
||||
assert.sameValue(C.ZW_\u200C_NJ(1), 1);
|
||||
assert.sameValue(C.ZW_\u200D_J(1), 1);
|
||||
|
||||
|
||||
C.m().next().then(function(v) {
|
||||
assert.sameValue(v.value, 42);
|
||||
assert.sameValue(v.done, true);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(C.$(1), 1);
|
||||
assert.sameValue(C._(1), 1);
|
||||
assert.sameValue(C.\u{6F}(1), 1);
|
||||
assert.sameValue(C.\u2118(1), 1);
|
||||
assert.sameValue(C.ZW_\u200C_NJ(1), 1);
|
||||
assert.sameValue(C.ZW_\u200D_J(1), 1);
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -90,15 +90,25 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(C.$(), 1);
|
||||
assert.sameValue(C._(), 1);
|
||||
assert.sameValue(C.\u{6F}(), 1);
|
||||
assert.sameValue(C.℘(), 1);
|
||||
assert.sameValue(C.ZW__NJ(), 1);
|
||||
assert.sameValue(C.ZW__J(), 1);
|
||||
|
||||
|
||||
C.m().next().then(function(v) {
|
||||
assert.sameValue(v.value, 42);
|
||||
assert.sameValue(v.done, true);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(C.$(), 1);
|
||||
assert.sameValue(C._(), 1);
|
||||
assert.sameValue(C.\u{6F}(), 1);
|
||||
assert.sameValue(C.℘(), 1);
|
||||
assert.sameValue(C.ZW__NJ(), 1);
|
||||
assert.sameValue(C.ZW__J(), 1);
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -90,15 +90,25 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(C.$(), 1);
|
||||
assert.sameValue(C._(), 1);
|
||||
assert.sameValue(C.\u{6F}(), 1);
|
||||
assert.sameValue(C.℘(), 1);
|
||||
assert.sameValue(C.ZW__NJ(), 1);
|
||||
assert.sameValue(C.ZW__J(), 1);
|
||||
|
||||
|
||||
C.m().next().then(function(v) {
|
||||
assert.sameValue(v.value, 42);
|
||||
assert.sameValue(v.done, true);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(C.$(), 1);
|
||||
assert.sameValue(C._(), 1);
|
||||
assert.sameValue(C.\u{6F}(), 1);
|
||||
assert.sameValue(C.℘(), 1);
|
||||
assert.sameValue(C.ZW__NJ(), 1);
|
||||
assert.sameValue(C.ZW__J(), 1);
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -90,15 +90,25 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(C.$(), 1);
|
||||
assert.sameValue(C._(), 1);
|
||||
assert.sameValue(C.\u{6F}(), 1);
|
||||
assert.sameValue(C.\u2118(), 1);
|
||||
assert.sameValue(C.ZW_\u200C_NJ(), 1);
|
||||
assert.sameValue(C.ZW_\u200D_J(), 1);
|
||||
|
||||
|
||||
C.m().next().then(function(v) {
|
||||
assert.sameValue(v.value, 42);
|
||||
assert.sameValue(v.done, true);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(C.$(), 1);
|
||||
assert.sameValue(C._(), 1);
|
||||
assert.sameValue(C.\u{6F}(), 1);
|
||||
assert.sameValue(C.\u2118(), 1);
|
||||
assert.sameValue(C.ZW_\u200C_NJ(), 1);
|
||||
assert.sameValue(C.ZW_\u200D_J(), 1);
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -96,15 +96,25 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(C.$(1), 1);
|
||||
assert.sameValue(C._(1), 1);
|
||||
assert.sameValue(C.\u{6F}(1), 1);
|
||||
assert.sameValue(C.\u2118(1), 1);
|
||||
assert.sameValue(C.ZW_\u200C_NJ(1), 1);
|
||||
assert.sameValue(C.ZW_\u200D_J(1), 1);
|
||||
|
||||
|
||||
C.m().next().then(function(v) {
|
||||
assert.sameValue(v.value, 42);
|
||||
assert.sameValue(v.done, true);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(C.$(1), 1);
|
||||
assert.sameValue(C._(1), 1);
|
||||
assert.sameValue(C.\u{6F}(1), 1);
|
||||
assert.sameValue(C.\u2118(1), 1);
|
||||
assert.sameValue(C.ZW_\u200C_NJ(1), 1);
|
||||
assert.sameValue(C.ZW_\u200D_J(1), 1);
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -47,24 +47,34 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
// Test the private fields do not appear as properties before set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6");
|
||||
|
||||
// Test if private fields can be sucessfully accessed and set to value
|
||||
assert.sameValue(C.x(), 42, "test 7");
|
||||
assert.sameValue(C.y(), 43, "test 8");
|
||||
|
||||
// Test the private fields do not appear as properties before after set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10");
|
||||
|
||||
C.m().next().then(function(v) {
|
||||
assert.sameValue(v.value, 42);
|
||||
assert.sameValue(v.done, true);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
// Test the private fields do not appear as properties before set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6");
|
||||
|
||||
// Test if private fields can be sucessfully accessed and set to value
|
||||
assert.sameValue(C.x(), 42, "test 7");
|
||||
assert.sameValue(C.y(), 43, "test 8");
|
||||
|
||||
// Test the private fields do not appear as properties before after set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10");
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -0,0 +1,98 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-private-methods-with-fields.case
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template
|
||||
/*---
|
||||
description: static private methods with fields (field definitions after a static async generator in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
features: [class-static-methods-private, class-static-fields-private, class, class-fields-public,
|
||||
async-iteration]
|
||||
flags: [generated, async]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement :
|
||||
...
|
||||
static FieldDefinition ;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName :
|
||||
PrivateName
|
||||
|
||||
PrivateName :
|
||||
# IdentifierName
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var C = class {
|
||||
static async *m() { return 42; } static #xVal; static #yVal;
|
||||
static #x(value) {
|
||||
this.#xVal = value;
|
||||
return this.#xVal;
|
||||
}
|
||||
static #y(value) {
|
||||
this.#yVal = value;
|
||||
return this.#yVal;
|
||||
}
|
||||
static x() {
|
||||
return this.#x(42);
|
||||
}
|
||||
static y() {
|
||||
return this.#y(43);
|
||||
}
|
||||
}
|
||||
|
||||
var c = new C();
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "m"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false);
|
||||
|
||||
verifyProperty(C, "m", {
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
C.m().next().then(function(v) {
|
||||
assert.sameValue(v.value, 42);
|
||||
assert.sameValue(v.done, true);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
// Test the private methods do not appear as properties before set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#xVal"), false, "test 7");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#xVal"), false, "test 8");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#xVal"), false, "test 9");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#yVal"), false, "test 10");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#yVal"), false, "test 11");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#yVal"), false, "test 12");
|
||||
|
||||
// Test if private fields can be sucessfully accessed and set to value
|
||||
assert.sameValue(C.x(), 42, "test 13");
|
||||
assert.sameValue(C.y(), 43, "test 14");
|
||||
|
||||
// Test the private fields do not appear as properties before after set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 15");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 16");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#xVal"), false, "test 17");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#yVal"), false, "test 18");
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
|
@ -25,17 +25,15 @@ info: |
|
|||
|
||||
|
||||
var C = class {
|
||||
static async *m() { return 42; } static #xVal; static #yVal;
|
||||
static async *m() { return 42; } ;
|
||||
static #x(value) {
|
||||
this.#xVal = value;
|
||||
return this.#xVal;
|
||||
return value / 2;
|
||||
}
|
||||
static #y(value) {
|
||||
this.#y = value;
|
||||
return this.#yVal;
|
||||
return value * 2;
|
||||
}
|
||||
static x() {
|
||||
return this.#x(42);
|
||||
return this.#x(84);
|
||||
}
|
||||
static y() {
|
||||
return this.#y(43);
|
||||
|
@ -53,24 +51,34 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
// Test the private methods do not appear as properties before set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#xVal"), false, "test 1");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#xVal"), false, "test 2");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#xVal"), false, "test 3");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#yVal"), false, "test 4");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#yVal"), false, "test 5");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#yVal"), false, "test 6");
|
||||
|
||||
// Test if private fields can be sucessfully accessed and set to value
|
||||
assert.sameValue(C.x(), 42, "test 7");
|
||||
assert.sameValue(C.y(), 43, "test 8");
|
||||
|
||||
// Test the private fields do not appear as properties before after set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#xVal"), false, "test 9");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#yVal"), false, "test 10");
|
||||
|
||||
C.m().next().then(function(v) {
|
||||
assert.sameValue(v.value, 42);
|
||||
assert.sameValue(v.done, true);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
// Test the private methods do not appear as properties before set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6");
|
||||
|
||||
// Test if private fields can be sucessfully accessed and set to value
|
||||
assert.sameValue(C.x(), 42, "test 7");
|
||||
assert.sameValue(C.y(), 86, "test 8");
|
||||
|
||||
// Test the private fields do not appear as properties before after set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10");
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -38,47 +38,57 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "a"), false);
|
||||
|
||||
verifyProperty(c, "a", {
|
||||
value: undefined,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "b"), false);
|
||||
|
||||
verifyProperty(c, "b", {
|
||||
value: undefined,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "c"), false);
|
||||
|
||||
verifyProperty(c, "c", {
|
||||
value: 39,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "d"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "d"), false);
|
||||
|
||||
verifyProperty(c, "d", {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
C.m().next().then(function(v) {
|
||||
assert.sameValue(v.value, 42);
|
||||
assert.sameValue(v.done, true);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "a"), false);
|
||||
|
||||
verifyProperty(c, "a", {
|
||||
value: undefined,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "b"), false);
|
||||
|
||||
verifyProperty(c, "b", {
|
||||
value: undefined,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "c"), false);
|
||||
|
||||
verifyProperty(c, "c", {
|
||||
value: 39,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "d"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "d"), false);
|
||||
|
||||
verifyProperty(c, "d", {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -39,40 +39,50 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "b"), false);
|
||||
|
||||
verifyProperty(c, "b", {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "x"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "x"), false);
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "10"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "10"), false);
|
||||
|
||||
verifyProperty(c, "10", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "not initialized"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "not initialized"), false);
|
||||
|
||||
verifyProperty(c, "not initialized", {
|
||||
value: undefined,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
C.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "b"), false);
|
||||
|
||||
verifyProperty(c, "b", {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "x"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "x"), false);
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "10"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "10"), false);
|
||||
|
||||
verifyProperty(c, "10", {
|
||||
value: "meep",
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "not initialized"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "not initialized"), false);
|
||||
|
||||
verifyProperty(c, "not initialized", {
|
||||
value: undefined,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -40,34 +40,44 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, x), false);
|
||||
|
||||
verifyProperty(c, x, {
|
||||
value: undefined,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, y), false);
|
||||
|
||||
verifyProperty(c, y, {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "x"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "x"), false);
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "y"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "y"), false);
|
||||
|
||||
C.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, x), false);
|
||||
|
||||
verifyProperty(c, x, {
|
||||
value: undefined,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, y), false);
|
||||
|
||||
verifyProperty(c, y, {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "x"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "x"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "x"), false);
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "y"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "y"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "y"), false);
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -98,11 +98,21 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(c.o(1), 1);
|
||||
assert.sameValue(c.℘(1), 1);
|
||||
assert.sameValue(c.ZW__NJ(1), 1);
|
||||
assert.sameValue(c.ZW__J(1), 1);
|
||||
|
||||
C.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(c.o(1), 1);
|
||||
assert.sameValue(c.℘(1), 1);
|
||||
assert.sameValue(c.ZW__NJ(1), 1);
|
||||
assert.sameValue(c.ZW__J(1), 1);
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -40,37 +40,47 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "a"), false);
|
||||
|
||||
verifyProperty(c, "a", {
|
||||
value: undefined,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "b"), false);
|
||||
|
||||
verifyProperty(c, "b", {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "c"), false);
|
||||
|
||||
verifyProperty(c, "c", {
|
||||
value: fn,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
|
||||
C.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "a"), false);
|
||||
|
||||
verifyProperty(c, "a", {
|
||||
value: undefined,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "b"), false);
|
||||
|
||||
verifyProperty(c, "b", {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "c"), false);
|
||||
|
||||
verifyProperty(c, "c", {
|
||||
value: fn,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -47,23 +47,33 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
// Test the private fields do not appear as properties before set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6");
|
||||
|
||||
// Test if private fields can be sucessfully accessed and set to value
|
||||
assert.sameValue(c.x(), 42, "test 7");
|
||||
assert.sameValue(c.y(), 43, "test 8");
|
||||
|
||||
// Test the private fields do not appear as properties before after set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 9");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 10");
|
||||
|
||||
C.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
// Test the private fields do not appear as properties before set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6");
|
||||
|
||||
// Test if private fields can be sucessfully accessed and set to value
|
||||
assert.sameValue(c.x(), 42, "test 7");
|
||||
assert.sameValue(c.y(), 43, "test 8");
|
||||
|
||||
// Test the private fields do not appear as properties before after set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 9");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 10");
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -74,13 +74,23 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(c.$, 1);
|
||||
assert.sameValue(c._, 1);
|
||||
assert.sameValue(c.\u{6F}, 1);
|
||||
assert.sameValue(c.\u2118, 1);
|
||||
assert.sameValue(c.ZW_\u200C_NJ, 1);
|
||||
assert.sameValue(c.ZW_\u200D_J, 1);
|
||||
|
||||
C.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(c.$, 1);
|
||||
assert.sameValue(c._, 1);
|
||||
assert.sameValue(c.\u{6F}, 1);
|
||||
assert.sameValue(c.\u2118, 1);
|
||||
assert.sameValue(c.ZW_\u200C_NJ, 1);
|
||||
assert.sameValue(c.ZW_\u200D_J, 1);
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -74,20 +74,30 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
c.$ = 1;
|
||||
c._ = 1;
|
||||
c.\u{6F} = 1;
|
||||
c.\u2118 = 1;
|
||||
c.ZW_\u200C_NJ = 1;
|
||||
c.ZW_\u200D_J = 1;
|
||||
|
||||
assert.sameValue(c.$, 1);
|
||||
assert.sameValue(c._, 1);
|
||||
assert.sameValue(c.\u{6F}, 1);
|
||||
assert.sameValue(c.\u2118, 1);
|
||||
assert.sameValue(c.ZW_\u200C_NJ, 1);
|
||||
assert.sameValue(c.ZW_\u200D_J, 1);
|
||||
|
||||
C.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
c.$ = 1;
|
||||
c._ = 1;
|
||||
c.\u{6F} = 1;
|
||||
c.\u2118 = 1;
|
||||
c.ZW_\u200C_NJ = 1;
|
||||
c.ZW_\u200D_J = 1;
|
||||
|
||||
assert.sameValue(c.$, 1);
|
||||
assert.sameValue(c._, 1);
|
||||
assert.sameValue(c.\u{6F}, 1);
|
||||
assert.sameValue(c.\u2118, 1);
|
||||
assert.sameValue(c.ZW_\u200C_NJ, 1);
|
||||
assert.sameValue(c.ZW_\u200D_J, 1);
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -95,14 +95,24 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(c.$(1), 1);
|
||||
assert.sameValue(c._(1), 1);
|
||||
assert.sameValue(c.\u{6F}(1), 1);
|
||||
assert.sameValue(c.℘(1), 1);
|
||||
assert.sameValue(c.ZW__NJ(1), 1);
|
||||
assert.sameValue(c.ZW__J(1), 1);
|
||||
|
||||
|
||||
C.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(c.$(1), 1);
|
||||
assert.sameValue(c._(1), 1);
|
||||
assert.sameValue(c.\u{6F}(1), 1);
|
||||
assert.sameValue(c.℘(1), 1);
|
||||
assert.sameValue(c.ZW__NJ(1), 1);
|
||||
assert.sameValue(c.ZW__J(1), 1);
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -89,14 +89,24 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(c.$(), 1);
|
||||
assert.sameValue(c._(), 1);
|
||||
assert.sameValue(c.\u{6F}(), 1);
|
||||
assert.sameValue(c.℘(), 1);
|
||||
assert.sameValue(c.ZW__NJ(), 1);
|
||||
assert.sameValue(c.ZW__J(), 1);
|
||||
|
||||
|
||||
C.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(c.$(), 1);
|
||||
assert.sameValue(c._(), 1);
|
||||
assert.sameValue(c.\u{6F}(), 1);
|
||||
assert.sameValue(c.℘(), 1);
|
||||
assert.sameValue(c.ZW__NJ(), 1);
|
||||
assert.sameValue(c.ZW__J(), 1);
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -89,14 +89,24 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(c.$(), 1);
|
||||
assert.sameValue(c._(), 1);
|
||||
assert.sameValue(c.\u{6F}(), 1);
|
||||
assert.sameValue(c.\u2118(), 1);
|
||||
assert.sameValue(c.ZW_\u200C_NJ(), 1);
|
||||
assert.sameValue(c.ZW_\u200D_J(), 1);
|
||||
|
||||
|
||||
C.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(c.$(), 1);
|
||||
assert.sameValue(c._(), 1);
|
||||
assert.sameValue(c.\u{6F}(), 1);
|
||||
assert.sameValue(c.\u2118(), 1);
|
||||
assert.sameValue(c.ZW_\u200C_NJ(), 1);
|
||||
assert.sameValue(c.ZW_\u200D_J(), 1);
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -95,14 +95,24 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(c.$(1), 1);
|
||||
assert.sameValue(c._(1), 1);
|
||||
assert.sameValue(c.\u{6F}(1), 1);
|
||||
assert.sameValue(c.\u2118(1), 1);
|
||||
assert.sameValue(c.ZW_\u200C_NJ(1), 1);
|
||||
assert.sameValue(c.ZW_\u200D_J(1), 1);
|
||||
|
||||
|
||||
C.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(c.$(1), 1);
|
||||
assert.sameValue(c._(1), 1);
|
||||
assert.sameValue(c.\u{6F}(1), 1);
|
||||
assert.sameValue(c.\u2118(1), 1);
|
||||
assert.sameValue(c.ZW_\u200C_NJ(1), 1);
|
||||
assert.sameValue(c.ZW_\u200D_J(1), 1);
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -61,41 +61,41 @@ info: |
|
|||
|
||||
|
||||
var C = class {
|
||||
static async m() { return 42; } static async #$(value) {
|
||||
static async m() { return 42; } static async * #$(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #_(value) {
|
||||
static async * #_(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #o(value) {
|
||||
static async * #o(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #℘(value) {
|
||||
static async * #℘(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #ZW__NJ(value) {
|
||||
static async * #ZW__NJ(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #ZW__J(value) {
|
||||
static async * #ZW__J(value) {
|
||||
yield await value;
|
||||
};
|
||||
static async $(value) {
|
||||
yield * await this.#$(value);
|
||||
static get $() {
|
||||
return this.#$;
|
||||
}
|
||||
static async _(value) {
|
||||
yield * await this.#_(value);
|
||||
static get _() {
|
||||
return this.#_;
|
||||
}
|
||||
static async o(value) {
|
||||
yield * await this.#o(value);
|
||||
static get o() {
|
||||
return this.#o;
|
||||
}
|
||||
static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield * await this.#℘(value);
|
||||
static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#℘;
|
||||
}
|
||||
static async ZW__NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield * await this.#ZW__NJ(value);
|
||||
static get ZW__NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__NJ;
|
||||
}
|
||||
static async ZW__J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield * await this.#ZW__J(value);
|
||||
static get ZW__J() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__J;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -111,24 +111,34 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
Promise.all([
|
||||
C.$(1).next(),
|
||||
C._(1).next(),
|
||||
C.o(1).next(),
|
||||
C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
C.ZW__NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
C.ZW__J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
]).then(results => {
|
||||
|
||||
assert.sameValue(results[0].value, 1);
|
||||
assert.sameValue(results[1].value, 1);
|
||||
assert.sameValue(results[2].value, 1);
|
||||
assert.sameValue(results[3].value, 1);
|
||||
assert.sameValue(results[4].value, 1);
|
||||
assert.sameValue(results[5].value, 1);
|
||||
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
||||
C.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
Promise.all([
|
||||
C.$(1).next(),
|
||||
C._(1).next(),
|
||||
C.o(1).next(),
|
||||
C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
C.ZW__NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
C.ZW__J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
]).then(results => {
|
||||
|
||||
assert.sameValue(results[0].value, 1);
|
||||
assert.sameValue(results[1].value, 1);
|
||||
assert.sameValue(results[2].value, 1);
|
||||
assert.sameValue(results[3].value, 1);
|
||||
assert.sameValue(results[4].value, 1);
|
||||
assert.sameValue(results[5].value, 1);
|
||||
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -62,40 +62,40 @@ info: |
|
|||
|
||||
var C = class {
|
||||
static async m() { return 42; } static async * #$(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #_(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #\u{6F}(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #\u2118(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #ZW_\u200C_NJ(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #ZW_\u200D_J(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
};
|
||||
static async * $(value) {
|
||||
yield * await this.#$(value);
|
||||
static async * $() {
|
||||
return this.#$;
|
||||
}
|
||||
static async * _(value) {
|
||||
yield * await this.#_(value);
|
||||
static async * _() {
|
||||
return this.#_;
|
||||
}
|
||||
static async * \u{6F}(value) {
|
||||
yield * await this.#\u{6F}(value);
|
||||
static async * \u{6F}() {
|
||||
return this.#\u{6F};
|
||||
}
|
||||
static async * \u2118(value) {
|
||||
yield * await this.#\u2118(value);
|
||||
static async * \u2118() {
|
||||
return this.#\u2118;
|
||||
}
|
||||
static async * ZW_\u200C_NJ(value) {
|
||||
yield * await this.#ZW_\u200C_NJ(value);
|
||||
static async * ZW_\u200C_NJ() {
|
||||
return this.#ZW_\u200C_NJ;
|
||||
}
|
||||
static async * ZW_\u200D_J(value) {
|
||||
yield * await this.#ZW_\u200D_J(value);
|
||||
static async * ZW_\u200D_J() {
|
||||
return this.#ZW_\u200D_J;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -111,25 +111,35 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
Promise.all([
|
||||
C.$(1).next(),
|
||||
C._(1).next(),
|
||||
C.\u{6F}(1).next(),
|
||||
C.\u2118(1).next(),
|
||||
C.ZW_\u200C_NJ(1).next(),
|
||||
C.ZW_\u200D_J(1).next(),
|
||||
]).then(results => {
|
||||
|
||||
assert.sameValue(results[0].value, 1);
|
||||
assert.sameValue(results[1].value, 1);
|
||||
assert.sameValue(results[2].value, 1);
|
||||
assert.sameValue(results[3].value, 1);
|
||||
assert.sameValue(results[4].value, 1);
|
||||
assert.sameValue(results[5].value, 1);
|
||||
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
||||
|
||||
C.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
Promise.all([
|
||||
C.$(1).next(),
|
||||
C._(1).next(),
|
||||
C.\u{6F}(1).next(),
|
||||
C.\u2118(1).next(),
|
||||
C.ZW_\u200C_NJ(1).next(),
|
||||
C.ZW_\u200D_J(1).next(),
|
||||
]).then(results => {
|
||||
|
||||
assert.sameValue(results[0].value, 1);
|
||||
assert.sameValue(results[1].value, 1);
|
||||
assert.sameValue(results[2].value, 1);
|
||||
assert.sameValue(results[3].value, 1);
|
||||
assert.sameValue(results[4].value, 1);
|
||||
assert.sameValue(results[5].value, 1);
|
||||
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -111,24 +111,34 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
Promise.all([
|
||||
C.$(1),
|
||||
C._(1),
|
||||
C.o(1),
|
||||
C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
C.ZW__NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
C.ZW__J(1), // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
]).then(results => {
|
||||
|
||||
assert.sameValue(results[0], 1);
|
||||
assert.sameValue(results[1], 1);
|
||||
assert.sameValue(results[2], 1);
|
||||
assert.sameValue(results[3], 1);
|
||||
assert.sameValue(results[4], 1);
|
||||
assert.sameValue(results[5], 1);
|
||||
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
||||
C.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
Promise.all([
|
||||
C.$(1),
|
||||
C._(1),
|
||||
C.o(1),
|
||||
C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
C.ZW__NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
C.ZW__J(1), // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
]).then(results => {
|
||||
|
||||
assert.sameValue(results[0], 1);
|
||||
assert.sameValue(results[1], 1);
|
||||
assert.sameValue(results[2], 1);
|
||||
assert.sameValue(results[3], 1);
|
||||
assert.sameValue(results[4], 1);
|
||||
assert.sameValue(results[5], 1);
|
||||
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -111,25 +111,35 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
Promise.all([
|
||||
C.$(1),
|
||||
C._(1),
|
||||
C.\u{6F}(1),
|
||||
C.\u2118(1),
|
||||
C.ZW_\u200C_NJ(1),
|
||||
C.ZW_\u200D_J(1),
|
||||
]).then(results => {
|
||||
|
||||
assert.sameValue(results[0], 1);
|
||||
assert.sameValue(results[1], 1);
|
||||
assert.sameValue(results[2], 1);
|
||||
assert.sameValue(results[3], 1);
|
||||
assert.sameValue(results[4], 1);
|
||||
assert.sameValue(results[5], 1);
|
||||
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
||||
|
||||
C.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
Promise.all([
|
||||
C.$(1),
|
||||
C._(1),
|
||||
C.\u{6F}(1),
|
||||
C.\u2118(1),
|
||||
C.ZW_\u200C_NJ(1),
|
||||
C.ZW_\u200D_J(1),
|
||||
]).then(results => {
|
||||
|
||||
assert.sameValue(results[0], 1);
|
||||
assert.sameValue(results[1], 1);
|
||||
assert.sameValue(results[2], 1);
|
||||
assert.sameValue(results[3], 1);
|
||||
assert.sameValue(results[4], 1);
|
||||
assert.sameValue(results[5], 1);
|
||||
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -62,40 +62,40 @@ info: |
|
|||
|
||||
var C = class {
|
||||
static async m() { return 42; } static * #$(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #_(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #o(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #℘(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW__NJ(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW__J(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
};
|
||||
static * $(value) {
|
||||
yield this.#$(value);
|
||||
static get $() {
|
||||
return this.#$;
|
||||
}
|
||||
static * _(value) {
|
||||
yield this.#_(value);
|
||||
static get _() {
|
||||
return this.#_;
|
||||
}
|
||||
static * o(value) {
|
||||
yield this.#o(value);
|
||||
static get o() {
|
||||
return this.#o;
|
||||
}
|
||||
static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield this.#℘(value);
|
||||
static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#℘;
|
||||
}
|
||||
static * ZW__NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield this.#ZW__NJ(value);
|
||||
static get ZW__NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__NJ;
|
||||
}
|
||||
static * ZW__J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield this.#ZW__J(value);
|
||||
static get ZW__J() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__J;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -111,13 +111,23 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(C.$(1).next().value, 1);
|
||||
assert.sameValue(C._(1).next().value, 1);
|
||||
assert.sameValue(C.o(1).next().value, 1);
|
||||
assert.sameValue(C.℘(1).next().value, 1);
|
||||
assert.sameValue(C.ZW__NJ(1).next().value, 1);
|
||||
assert.sameValue(C.ZW__J(1).next().value, 1);
|
||||
|
||||
C.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(C.$(1).next().value, 1);
|
||||
assert.sameValue(C._(1).next().value, 1);
|
||||
assert.sameValue(C.o(1).next().value, 1);
|
||||
assert.sameValue(C.℘(1).next().value, 1);
|
||||
assert.sameValue(C.ZW__NJ(1).next().value, 1);
|
||||
assert.sameValue(C.ZW__J(1).next().value, 1);
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -62,40 +62,40 @@ info: |
|
|||
|
||||
var C = class {
|
||||
static async m() { return 42; } static * #$(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #_(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #\u{6F}(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #\u2118(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW_\u200C_NJ(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW_\u200D_J(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
};
|
||||
static * $(value) {
|
||||
yield this.#$(value);
|
||||
static get $() {
|
||||
return this.#$;
|
||||
}
|
||||
static * _(value) {
|
||||
yield this.#_(value);
|
||||
static get _() {
|
||||
return this.#_;
|
||||
}
|
||||
static * \u{6F}(value) {
|
||||
yield this.#\u{6F}(value);
|
||||
static get \u{6F}() {
|
||||
return this.#\u{6F};
|
||||
}
|
||||
static * \u2118(value) {
|
||||
yield this.#\u2118(value);
|
||||
static get \u2118() {
|
||||
return this.#\u2118;
|
||||
}
|
||||
static * ZW_\u200C_NJ(value) {
|
||||
yield this.#ZW_\u200C_NJ(value);
|
||||
static get ZW_\u200C_NJ() {
|
||||
return this.#ZW_\u200C_NJ;
|
||||
}
|
||||
static * ZW_\u200D_J(value) {
|
||||
yield this.#ZW_\u200D_J(value);
|
||||
static get ZW_\u200D_J() {
|
||||
return this.#ZW_\u200D_J;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -111,14 +111,24 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(C.$(1).next().value, 1);
|
||||
assert.sameValue(C._(1).next().value, 1);
|
||||
assert.sameValue(C.\u{6F}(1).next().value, 1);
|
||||
assert.sameValue(C.\u2118(1).next().value, 1);
|
||||
assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1);
|
||||
assert.sameValue(C.ZW_\u200D_J(1).next().value, 1);
|
||||
|
||||
|
||||
C.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(C.$(1).next().value, 1);
|
||||
assert.sameValue(C._(1).next().value, 1);
|
||||
assert.sameValue(C.\u{6F}(1).next().value, 1);
|
||||
assert.sameValue(C.\u2118(1).next().value, 1);
|
||||
assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1);
|
||||
assert.sameValue(C.ZW_\u200D_J(1).next().value, 1);
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -108,14 +108,24 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(C.$(1), 1);
|
||||
assert.sameValue(C._(1), 1);
|
||||
assert.sameValue(C.o(1), 1);
|
||||
assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
assert.sameValue(C.ZW__NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
assert.sameValue(C.ZW__J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
|
||||
|
||||
C.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(C.$(1), 1);
|
||||
assert.sameValue(C._(1), 1);
|
||||
assert.sameValue(C.o(1), 1);
|
||||
assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
assert.sameValue(C.ZW__NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
assert.sameValue(C.ZW__J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -108,14 +108,24 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(C.$(1), 1);
|
||||
assert.sameValue(C._(1), 1);
|
||||
assert.sameValue(C.\u{6F}(1), 1);
|
||||
assert.sameValue(C.\u2118(1), 1);
|
||||
assert.sameValue(C.ZW_\u200C_NJ(1), 1);
|
||||
assert.sameValue(C.ZW_\u200D_J(1), 1);
|
||||
|
||||
|
||||
C.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(C.$(1), 1);
|
||||
assert.sameValue(C._(1), 1);
|
||||
assert.sameValue(C.\u{6F}(1), 1);
|
||||
assert.sameValue(C.\u2118(1), 1);
|
||||
assert.sameValue(C.ZW_\u200C_NJ(1), 1);
|
||||
assert.sameValue(C.ZW_\u200D_J(1), 1);
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -96,14 +96,24 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(C.$(1), 1);
|
||||
assert.sameValue(C._(1), 1);
|
||||
assert.sameValue(C.o(1), 1);
|
||||
assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
assert.sameValue(C.ZW__NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
assert.sameValue(C.ZW__J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
|
||||
|
||||
C.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(C.$(1), 1);
|
||||
assert.sameValue(C._(1), 1);
|
||||
assert.sameValue(C.o(1), 1);
|
||||
assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
assert.sameValue(C.ZW__NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
assert.sameValue(C.ZW__J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -96,14 +96,24 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(C.$(1), 1);
|
||||
assert.sameValue(C._(1), 1);
|
||||
assert.sameValue(C.o(1), 1);
|
||||
assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
assert.sameValue(C.ZW__NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
assert.sameValue(C.ZW__J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
|
||||
|
||||
C.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(C.$(1), 1);
|
||||
assert.sameValue(C._(1), 1);
|
||||
assert.sameValue(C.o(1), 1);
|
||||
assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
assert.sameValue(C.ZW__NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
assert.sameValue(C.ZW__J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -96,14 +96,24 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(C.$(1), 1);
|
||||
assert.sameValue(C._(1), 1);
|
||||
assert.sameValue(C.\u{6F}(1), 1);
|
||||
assert.sameValue(C.\u2118(1), 1);
|
||||
assert.sameValue(C.ZW_\u200C_NJ(1), 1);
|
||||
assert.sameValue(C.ZW_\u200D_J(1), 1);
|
||||
|
||||
|
||||
C.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(C.$(1), 1);
|
||||
assert.sameValue(C._(1), 1);
|
||||
assert.sameValue(C.\u{6F}(1), 1);
|
||||
assert.sameValue(C.\u2118(1), 1);
|
||||
assert.sameValue(C.ZW_\u200C_NJ(1), 1);
|
||||
assert.sameValue(C.ZW_\u200D_J(1), 1);
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -90,14 +90,24 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(C.$(), 1);
|
||||
assert.sameValue(C._(), 1);
|
||||
assert.sameValue(C.\u{6F}(), 1);
|
||||
assert.sameValue(C.℘(), 1);
|
||||
assert.sameValue(C.ZW__NJ(), 1);
|
||||
assert.sameValue(C.ZW__J(), 1);
|
||||
|
||||
|
||||
C.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(C.$(), 1);
|
||||
assert.sameValue(C._(), 1);
|
||||
assert.sameValue(C.\u{6F}(), 1);
|
||||
assert.sameValue(C.℘(), 1);
|
||||
assert.sameValue(C.ZW__NJ(), 1);
|
||||
assert.sameValue(C.ZW__J(), 1);
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -90,14 +90,24 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(C.$(), 1);
|
||||
assert.sameValue(C._(), 1);
|
||||
assert.sameValue(C.\u{6F}(), 1);
|
||||
assert.sameValue(C.℘(), 1);
|
||||
assert.sameValue(C.ZW__NJ(), 1);
|
||||
assert.sameValue(C.ZW__J(), 1);
|
||||
|
||||
|
||||
C.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(C.$(), 1);
|
||||
assert.sameValue(C._(), 1);
|
||||
assert.sameValue(C.\u{6F}(), 1);
|
||||
assert.sameValue(C.℘(), 1);
|
||||
assert.sameValue(C.ZW__NJ(), 1);
|
||||
assert.sameValue(C.ZW__J(), 1);
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -90,14 +90,24 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(C.$(), 1);
|
||||
assert.sameValue(C._(), 1);
|
||||
assert.sameValue(C.\u{6F}(), 1);
|
||||
assert.sameValue(C.\u2118(), 1);
|
||||
assert.sameValue(C.ZW_\u200C_NJ(), 1);
|
||||
assert.sameValue(C.ZW_\u200D_J(), 1);
|
||||
|
||||
|
||||
C.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(C.$(), 1);
|
||||
assert.sameValue(C._(), 1);
|
||||
assert.sameValue(C.\u{6F}(), 1);
|
||||
assert.sameValue(C.\u2118(), 1);
|
||||
assert.sameValue(C.ZW_\u200C_NJ(), 1);
|
||||
assert.sameValue(C.ZW_\u200D_J(), 1);
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -96,14 +96,24 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(C.$(1), 1);
|
||||
assert.sameValue(C._(1), 1);
|
||||
assert.sameValue(C.\u{6F}(1), 1);
|
||||
assert.sameValue(C.\u2118(1), 1);
|
||||
assert.sameValue(C.ZW_\u200C_NJ(1), 1);
|
||||
assert.sameValue(C.ZW_\u200D_J(1), 1);
|
||||
|
||||
|
||||
C.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(C.$(1), 1);
|
||||
assert.sameValue(C._(1), 1);
|
||||
assert.sameValue(C.\u{6F}(1), 1);
|
||||
assert.sameValue(C.\u2118(1), 1);
|
||||
assert.sameValue(C.ZW_\u200C_NJ(1), 1);
|
||||
assert.sameValue(C.ZW_\u200D_J(1), 1);
|
||||
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -47,23 +47,33 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
// Test the private fields do not appear as properties before set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6");
|
||||
|
||||
// Test if private fields can be sucessfully accessed and set to value
|
||||
assert.sameValue(C.x(), 42, "test 7");
|
||||
assert.sameValue(C.y(), 43, "test 8");
|
||||
|
||||
// Test the private fields do not appear as properties before after set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10");
|
||||
|
||||
C.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
// Test the private fields do not appear as properties before set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6");
|
||||
|
||||
// Test if private fields can be sucessfully accessed and set to value
|
||||
assert.sameValue(C.x(), 42, "test 7");
|
||||
assert.sameValue(C.y(), 43, "test 8");
|
||||
|
||||
// Test the private fields do not appear as properties before after set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10");
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -0,0 +1,97 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-private-methods-with-fields.case
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-async-method.template
|
||||
/*---
|
||||
description: static private methods with fields (field definitions after a static async method in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
features: [class-static-methods-private, class-static-fields-private, class, class-fields-public,
|
||||
async-functions]
|
||||
flags: [generated, async]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement :
|
||||
...
|
||||
static FieldDefinition ;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName :
|
||||
PrivateName
|
||||
|
||||
PrivateName :
|
||||
# IdentifierName
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var C = class {
|
||||
static async m() { return 42; } static #xVal; static #yVal;
|
||||
static #x(value) {
|
||||
this.#xVal = value;
|
||||
return this.#xVal;
|
||||
}
|
||||
static #y(value) {
|
||||
this.#yVal = value;
|
||||
return this.#yVal;
|
||||
}
|
||||
static x() {
|
||||
return this.#x(42);
|
||||
}
|
||||
static y() {
|
||||
return this.#y(43);
|
||||
}
|
||||
}
|
||||
|
||||
var c = new C();
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "m"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false);
|
||||
|
||||
verifyProperty(C, "m", {
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
C.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
// Test the private methods do not appear as properties before set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#xVal"), false, "test 7");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#xVal"), false, "test 8");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#xVal"), false, "test 9");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#yVal"), false, "test 10");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#yVal"), false, "test 11");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#yVal"), false, "test 12");
|
||||
|
||||
// Test if private fields can be sucessfully accessed and set to value
|
||||
assert.sameValue(C.x(), 42, "test 13");
|
||||
assert.sameValue(C.y(), 43, "test 14");
|
||||
|
||||
// Test the private fields do not appear as properties before after set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 15");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 16");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#xVal"), false, "test 17");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#yVal"), false, "test 18");
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
|
@ -25,17 +25,15 @@ info: |
|
|||
|
||||
|
||||
var C = class {
|
||||
static async m() { return 42; } static #xVal; static #yVal;
|
||||
static async m() { return 42; } ;
|
||||
static #x(value) {
|
||||
this.#xVal = value;
|
||||
return this.#xVal;
|
||||
return value / 2;
|
||||
}
|
||||
static #y(value) {
|
||||
this.#y = value;
|
||||
return this.#yVal;
|
||||
return value * 2;
|
||||
}
|
||||
static x() {
|
||||
return this.#x(42);
|
||||
return this.#x(84);
|
||||
}
|
||||
static y() {
|
||||
return this.#y(43);
|
||||
|
@ -53,23 +51,33 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
// Test the private methods do not appear as properties before set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#xVal"), false, "test 1");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#xVal"), false, "test 2");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#xVal"), false, "test 3");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#yVal"), false, "test 4");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#yVal"), false, "test 5");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#yVal"), false, "test 6");
|
||||
|
||||
// Test if private fields can be sucessfully accessed and set to value
|
||||
assert.sameValue(C.x(), 42, "test 7");
|
||||
assert.sameValue(C.y(), 43, "test 8");
|
||||
|
||||
// Test the private fields do not appear as properties before after set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#xVal"), false, "test 9");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#yVal"), false, "test 10");
|
||||
|
||||
C.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
// Test the private methods do not appear as properties before set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6");
|
||||
|
||||
// Test if private fields can be sucessfully accessed and set to value
|
||||
assert.sameValue(C.x(), 42, "test 7");
|
||||
assert.sameValue(C.y(), 86, "test 8");
|
||||
|
||||
// Test the private fields do not appear as properties before after set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10");
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -38,46 +38,56 @@ verifyProperty(C, "m", {
|
|||
writable: true,
|
||||
}, {restore: true});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "a"), false);
|
||||
|
||||
verifyProperty(c, "a", {
|
||||
value: undefined,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "b"), false);
|
||||
|
||||
verifyProperty(c, "b", {
|
||||
value: undefined,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "c"), false);
|
||||
|
||||
verifyProperty(c, "c", {
|
||||
value: 39,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "d"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "d"), false);
|
||||
|
||||
verifyProperty(c, "d", {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
C.m().then(function(v) {
|
||||
assert.sameValue(v, 42);
|
||||
|
||||
function assertions() {
|
||||
// Cover $DONE handler for async cases.
|
||||
function $DONE(error) {
|
||||
if (error) {
|
||||
throw new Test262Error('Test262:AsyncTestFailure')
|
||||
}
|
||||
}
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "a"), false);
|
||||
|
||||
verifyProperty(c, "a", {
|
||||
value: undefined,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "b"), false);
|
||||
|
||||
verifyProperty(c, "b", {
|
||||
value: undefined,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "c"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "c"), false);
|
||||
|
||||
verifyProperty(c, "c", {
|
||||
value: 39,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "d"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "d"), false);
|
||||
|
||||
verifyProperty(c, "d", {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
|
||||
return Promise.resolve(assertions());
|
||||
}, $DONE).then($DONE, $DONE);
|
||||
|
|
|
@ -61,41 +61,41 @@ info: |
|
|||
|
||||
|
||||
var C = class {
|
||||
static *m() { return 42; } static async #$(value) {
|
||||
static *m() { return 42; } static async * #$(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #_(value) {
|
||||
static async * #_(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #o(value) {
|
||||
static async * #o(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #℘(value) {
|
||||
static async * #℘(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #ZW__NJ(value) {
|
||||
static async * #ZW__NJ(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #ZW__J(value) {
|
||||
static async * #ZW__J(value) {
|
||||
yield await value;
|
||||
};
|
||||
static async $(value) {
|
||||
yield * await this.#$(value);
|
||||
static get $() {
|
||||
return this.#$;
|
||||
}
|
||||
static async _(value) {
|
||||
yield * await this.#_(value);
|
||||
static get _() {
|
||||
return this.#_;
|
||||
}
|
||||
static async o(value) {
|
||||
yield * await this.#o(value);
|
||||
static get o() {
|
||||
return this.#o;
|
||||
}
|
||||
static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield * await this.#℘(value);
|
||||
static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#℘;
|
||||
}
|
||||
static async ZW__NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield * await this.#ZW__NJ(value);
|
||||
static get ZW__NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__NJ;
|
||||
}
|
||||
static async ZW__J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield * await this.#ZW__J(value);
|
||||
static get ZW__J() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__J;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -62,40 +62,40 @@ info: |
|
|||
|
||||
var C = class {
|
||||
static *m() { return 42; } static async * #$(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #_(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #\u{6F}(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #\u2118(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #ZW_\u200C_NJ(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #ZW_\u200D_J(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
};
|
||||
static async * $(value) {
|
||||
yield * await this.#$(value);
|
||||
static async * $() {
|
||||
return this.#$;
|
||||
}
|
||||
static async * _(value) {
|
||||
yield * await this.#_(value);
|
||||
static async * _() {
|
||||
return this.#_;
|
||||
}
|
||||
static async * \u{6F}(value) {
|
||||
yield * await this.#\u{6F}(value);
|
||||
static async * \u{6F}() {
|
||||
return this.#\u{6F};
|
||||
}
|
||||
static async * \u2118(value) {
|
||||
yield * await this.#\u2118(value);
|
||||
static async * \u2118() {
|
||||
return this.#\u2118;
|
||||
}
|
||||
static async * ZW_\u200C_NJ(value) {
|
||||
yield * await this.#ZW_\u200C_NJ(value);
|
||||
static async * ZW_\u200C_NJ() {
|
||||
return this.#ZW_\u200C_NJ;
|
||||
}
|
||||
static async * ZW_\u200D_J(value) {
|
||||
yield * await this.#ZW_\u200D_J(value);
|
||||
static async * ZW_\u200D_J() {
|
||||
return this.#ZW_\u200D_J;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -62,40 +62,40 @@ info: |
|
|||
|
||||
var C = class {
|
||||
static *m() { return 42; } static * #$(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #_(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #o(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #℘(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW__NJ(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW__J(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
};
|
||||
static * $(value) {
|
||||
yield this.#$(value);
|
||||
static get $() {
|
||||
return this.#$;
|
||||
}
|
||||
static * _(value) {
|
||||
yield this.#_(value);
|
||||
static get _() {
|
||||
return this.#_;
|
||||
}
|
||||
static * o(value) {
|
||||
yield this.#o(value);
|
||||
static get o() {
|
||||
return this.#o;
|
||||
}
|
||||
static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield this.#℘(value);
|
||||
static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#℘;
|
||||
}
|
||||
static * ZW__NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield this.#ZW__NJ(value);
|
||||
static get ZW__NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__NJ;
|
||||
}
|
||||
static * ZW__J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield this.#ZW__J(value);
|
||||
static get ZW__J() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__J;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -62,40 +62,40 @@ info: |
|
|||
|
||||
var C = class {
|
||||
static *m() { return 42; } static * #$(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #_(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #\u{6F}(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #\u2118(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW_\u200C_NJ(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW_\u200D_J(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
};
|
||||
static * $(value) {
|
||||
yield this.#$(value);
|
||||
static get $() {
|
||||
return this.#$;
|
||||
}
|
||||
static * _(value) {
|
||||
yield this.#_(value);
|
||||
static get _() {
|
||||
return this.#_;
|
||||
}
|
||||
static * \u{6F}(value) {
|
||||
yield this.#\u{6F}(value);
|
||||
static get \u{6F}() {
|
||||
return this.#\u{6F};
|
||||
}
|
||||
static * \u2118(value) {
|
||||
yield this.#\u2118(value);
|
||||
static get \u2118() {
|
||||
return this.#\u2118;
|
||||
}
|
||||
static * ZW_\u200C_NJ(value) {
|
||||
yield this.#ZW_\u200C_NJ(value);
|
||||
static get ZW_\u200C_NJ() {
|
||||
return this.#ZW_\u200C_NJ;
|
||||
}
|
||||
static * ZW_\u200D_J(value) {
|
||||
yield this.#ZW_\u200D_J(value);
|
||||
static get ZW_\u200D_J() {
|
||||
return this.#ZW_\u200D_J;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,83 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-private-methods-with-fields.case
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-gen.template
|
||||
/*---
|
||||
description: static private methods with fields (field definitions after a static generator in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
features: [class-static-methods-private, class-static-fields-private, generators, class, class-fields-public]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement :
|
||||
...
|
||||
static FieldDefinition ;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName :
|
||||
PrivateName
|
||||
|
||||
PrivateName :
|
||||
# IdentifierName
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var C = class {
|
||||
static *m() { return 42; } static #xVal; static #yVal;
|
||||
static #x(value) {
|
||||
this.#xVal = value;
|
||||
return this.#xVal;
|
||||
}
|
||||
static #y(value) {
|
||||
this.#yVal = value;
|
||||
return this.#yVal;
|
||||
}
|
||||
static x() {
|
||||
return this.#x(42);
|
||||
}
|
||||
static y() {
|
||||
return this.#y(43);
|
||||
}
|
||||
}
|
||||
|
||||
var c = new C();
|
||||
|
||||
assert.sameValue(C.m().next().value, 42);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "m"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false);
|
||||
|
||||
verifyProperty(C, "m", {
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
});
|
||||
|
||||
// Test the private methods do not appear as properties before set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#xVal"), false, "test 7");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#xVal"), false, "test 8");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#xVal"), false, "test 9");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#yVal"), false, "test 10");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#yVal"), false, "test 11");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#yVal"), false, "test 12");
|
||||
|
||||
// Test if private fields can be sucessfully accessed and set to value
|
||||
assert.sameValue(C.x(), 42, "test 13");
|
||||
assert.sameValue(C.y(), 43, "test 14");
|
||||
|
||||
// Test the private fields do not appear as properties before after set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 15");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 16");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#xVal"), false, "test 17");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#yVal"), false, "test 18");
|
|
@ -25,17 +25,15 @@ info: |
|
|||
|
||||
|
||||
var C = class {
|
||||
static *m() { return 42; } static #xVal; static #yVal;
|
||||
static *m() { return 42; } ;
|
||||
static #x(value) {
|
||||
this.#xVal = value;
|
||||
return this.#xVal;
|
||||
return value / 2;
|
||||
}
|
||||
static #y(value) {
|
||||
this.#y = value;
|
||||
return this.#yVal;
|
||||
return value * 2;
|
||||
}
|
||||
static x() {
|
||||
return this.#x(42);
|
||||
return this.#x(84);
|
||||
}
|
||||
static y() {
|
||||
return this.#y(43);
|
||||
|
@ -55,18 +53,18 @@ verifyProperty(C, "m", {
|
|||
});
|
||||
|
||||
// Test the private methods do not appear as properties before set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#xVal"), false, "test 1");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#xVal"), false, "test 2");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#xVal"), false, "test 3");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#yVal"), false, "test 4");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#yVal"), false, "test 5");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#yVal"), false, "test 6");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6");
|
||||
|
||||
// Test if private fields can be sucessfully accessed and set to value
|
||||
assert.sameValue(C.x(), 42, "test 7");
|
||||
assert.sameValue(C.y(), 43, "test 8");
|
||||
assert.sameValue(C.y(), 86, "test 8");
|
||||
|
||||
// Test the private fields do not appear as properties before after set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#xVal"), false, "test 9");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#yVal"), false, "test 10");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10");
|
||||
|
|
|
@ -61,41 +61,41 @@ info: |
|
|||
|
||||
|
||||
var C = class {
|
||||
static m() { return 42; } static async #$(value) {
|
||||
static m() { return 42; } static async * #$(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #_(value) {
|
||||
static async * #_(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #o(value) {
|
||||
static async * #o(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #℘(value) {
|
||||
static async * #℘(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #ZW__NJ(value) {
|
||||
static async * #ZW__NJ(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #ZW__J(value) {
|
||||
static async * #ZW__J(value) {
|
||||
yield await value;
|
||||
};
|
||||
static async $(value) {
|
||||
yield * await this.#$(value);
|
||||
static get $() {
|
||||
return this.#$;
|
||||
}
|
||||
static async _(value) {
|
||||
yield * await this.#_(value);
|
||||
static get _() {
|
||||
return this.#_;
|
||||
}
|
||||
static async o(value) {
|
||||
yield * await this.#o(value);
|
||||
static get o() {
|
||||
return this.#o;
|
||||
}
|
||||
static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield * await this.#℘(value);
|
||||
static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#℘;
|
||||
}
|
||||
static async ZW__NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield * await this.#ZW__NJ(value);
|
||||
static get ZW__NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__NJ;
|
||||
}
|
||||
static async ZW__J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield * await this.#ZW__J(value);
|
||||
static get ZW__J() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__J;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -62,40 +62,40 @@ info: |
|
|||
|
||||
var C = class {
|
||||
static m() { return 42; } static async * #$(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #_(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #\u{6F}(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #\u2118(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #ZW_\u200C_NJ(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #ZW_\u200D_J(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
};
|
||||
static async * $(value) {
|
||||
yield * await this.#$(value);
|
||||
static async * $() {
|
||||
return this.#$;
|
||||
}
|
||||
static async * _(value) {
|
||||
yield * await this.#_(value);
|
||||
static async * _() {
|
||||
return this.#_;
|
||||
}
|
||||
static async * \u{6F}(value) {
|
||||
yield * await this.#\u{6F}(value);
|
||||
static async * \u{6F}() {
|
||||
return this.#\u{6F};
|
||||
}
|
||||
static async * \u2118(value) {
|
||||
yield * await this.#\u2118(value);
|
||||
static async * \u2118() {
|
||||
return this.#\u2118;
|
||||
}
|
||||
static async * ZW_\u200C_NJ(value) {
|
||||
yield * await this.#ZW_\u200C_NJ(value);
|
||||
static async * ZW_\u200C_NJ() {
|
||||
return this.#ZW_\u200C_NJ;
|
||||
}
|
||||
static async * ZW_\u200D_J(value) {
|
||||
yield * await this.#ZW_\u200D_J(value);
|
||||
static async * ZW_\u200D_J() {
|
||||
return this.#ZW_\u200D_J;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -62,40 +62,40 @@ info: |
|
|||
|
||||
var C = class {
|
||||
static m() { return 42; } static * #$(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #_(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #o(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #℘(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW__NJ(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW__J(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
};
|
||||
static * $(value) {
|
||||
yield this.#$(value);
|
||||
static get $() {
|
||||
return this.#$;
|
||||
}
|
||||
static * _(value) {
|
||||
yield this.#_(value);
|
||||
static get _() {
|
||||
return this.#_;
|
||||
}
|
||||
static * o(value) {
|
||||
yield this.#o(value);
|
||||
static get o() {
|
||||
return this.#o;
|
||||
}
|
||||
static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield this.#℘(value);
|
||||
static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#℘;
|
||||
}
|
||||
static * ZW__NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield this.#ZW__NJ(value);
|
||||
static get ZW__NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__NJ;
|
||||
}
|
||||
static * ZW__J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield this.#ZW__J(value);
|
||||
static get ZW__J() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__J;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -62,40 +62,40 @@ info: |
|
|||
|
||||
var C = class {
|
||||
static m() { return 42; } static * #$(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #_(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #\u{6F}(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #\u2118(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW_\u200C_NJ(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW_\u200D_J(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
};
|
||||
static * $(value) {
|
||||
yield this.#$(value);
|
||||
static get $() {
|
||||
return this.#$;
|
||||
}
|
||||
static * _(value) {
|
||||
yield this.#_(value);
|
||||
static get _() {
|
||||
return this.#_;
|
||||
}
|
||||
static * \u{6F}(value) {
|
||||
yield this.#\u{6F}(value);
|
||||
static get \u{6F}() {
|
||||
return this.#\u{6F};
|
||||
}
|
||||
static * \u2118(value) {
|
||||
yield this.#\u2118(value);
|
||||
static get \u2118() {
|
||||
return this.#\u2118;
|
||||
}
|
||||
static * ZW_\u200C_NJ(value) {
|
||||
yield this.#ZW_\u200C_NJ(value);
|
||||
static get ZW_\u200C_NJ() {
|
||||
return this.#ZW_\u200C_NJ;
|
||||
}
|
||||
static * ZW_\u200D_J(value) {
|
||||
yield this.#ZW_\u200D_J(value);
|
||||
static get ZW_\u200D_J() {
|
||||
return this.#ZW_\u200D_J;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,83 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-private-methods-with-fields.case
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-method.template
|
||||
/*---
|
||||
description: static private methods with fields (field definitions after a static method in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
features: [class-static-methods-private, class-static-fields-private, class, class-fields-public]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement :
|
||||
...
|
||||
static FieldDefinition ;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName :
|
||||
PrivateName
|
||||
|
||||
PrivateName :
|
||||
# IdentifierName
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var C = class {
|
||||
static m() { return 42; } static #xVal; static #yVal;
|
||||
static #x(value) {
|
||||
this.#xVal = value;
|
||||
return this.#xVal;
|
||||
}
|
||||
static #y(value) {
|
||||
this.#yVal = value;
|
||||
return this.#yVal;
|
||||
}
|
||||
static x() {
|
||||
return this.#x(42);
|
||||
}
|
||||
static y() {
|
||||
return this.#y(43);
|
||||
}
|
||||
}
|
||||
|
||||
var c = new C();
|
||||
|
||||
assert.sameValue(C.m(), 42);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "m"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false);
|
||||
|
||||
verifyProperty(C, "m", {
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
});
|
||||
|
||||
// Test the private methods do not appear as properties before set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#xVal"), false, "test 7");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#xVal"), false, "test 8");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#xVal"), false, "test 9");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#yVal"), false, "test 10");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#yVal"), false, "test 11");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#yVal"), false, "test 12");
|
||||
|
||||
// Test if private fields can be sucessfully accessed and set to value
|
||||
assert.sameValue(C.x(), 42, "test 13");
|
||||
assert.sameValue(C.y(), 43, "test 14");
|
||||
|
||||
// Test the private fields do not appear as properties before after set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 15");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 16");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#xVal"), false, "test 17");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#yVal"), false, "test 18");
|
|
@ -25,17 +25,15 @@ info: |
|
|||
|
||||
|
||||
var C = class {
|
||||
static m() { return 42; } static #xVal; static #yVal;
|
||||
static m() { return 42; } ;
|
||||
static #x(value) {
|
||||
this.#xVal = value;
|
||||
return this.#xVal;
|
||||
return value / 2;
|
||||
}
|
||||
static #y(value) {
|
||||
this.#y = value;
|
||||
return this.#yVal;
|
||||
return value * 2;
|
||||
}
|
||||
static x() {
|
||||
return this.#x(42);
|
||||
return this.#x(84);
|
||||
}
|
||||
static y() {
|
||||
return this.#y(43);
|
||||
|
@ -55,18 +53,18 @@ verifyProperty(C, "m", {
|
|||
});
|
||||
|
||||
// Test the private methods do not appear as properties before set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#xVal"), false, "test 1");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#xVal"), false, "test 2");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#xVal"), false, "test 3");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#yVal"), false, "test 4");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#yVal"), false, "test 5");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#yVal"), false, "test 6");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6");
|
||||
|
||||
// Test if private fields can be sucessfully accessed and set to value
|
||||
assert.sameValue(C.x(), 42, "test 7");
|
||||
assert.sameValue(C.y(), 43, "test 8");
|
||||
assert.sameValue(C.y(), 86, "test 8");
|
||||
|
||||
// Test the private fields do not appear as properties before after set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#xVal"), false, "test 9");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#yVal"), false, "test 10");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10");
|
||||
|
|
|
@ -63,43 +63,43 @@ info: |
|
|||
var C = class {
|
||||
foo = "foobar";
|
||||
m() { return 42 }
|
||||
static async #$(value) {
|
||||
static async * #$(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #_(value) {
|
||||
static async * #_(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #o(value) {
|
||||
static async * #o(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #℘(value) {
|
||||
static async * #℘(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #ZW__NJ(value) {
|
||||
static async * #ZW__NJ(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #ZW__J(value) {
|
||||
static async * #ZW__J(value) {
|
||||
yield await value;
|
||||
}
|
||||
m2() { return 39 }
|
||||
bar = "barbaz";
|
||||
static async $(value) {
|
||||
yield * await this.#$(value);
|
||||
static get $() {
|
||||
return this.#$;
|
||||
}
|
||||
static async _(value) {
|
||||
yield * await this.#_(value);
|
||||
static get _() {
|
||||
return this.#_;
|
||||
}
|
||||
static async o(value) {
|
||||
yield * await this.#o(value);
|
||||
static get o() {
|
||||
return this.#o;
|
||||
}
|
||||
static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield * await this.#℘(value);
|
||||
static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#℘;
|
||||
}
|
||||
static async ZW__NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield * await this.#ZW__NJ(value);
|
||||
static get ZW__NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__NJ;
|
||||
}
|
||||
static async ZW__J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield * await this.#ZW__J(value);
|
||||
static get ZW__J() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__J;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -64,42 +64,42 @@ var C = class {
|
|||
foo = "foobar";
|
||||
m() { return 42 }
|
||||
static async * #$(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #_(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #\u{6F}(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #\u2118(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #ZW_\u200C_NJ(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #ZW_\u200D_J(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
m2() { return 39 }
|
||||
bar = "barbaz";
|
||||
static async * $(value) {
|
||||
yield * await this.#$(value);
|
||||
static async * $() {
|
||||
return this.#$;
|
||||
}
|
||||
static async * _(value) {
|
||||
yield * await this.#_(value);
|
||||
static async * _() {
|
||||
return this.#_;
|
||||
}
|
||||
static async * \u{6F}(value) {
|
||||
yield * await this.#\u{6F}(value);
|
||||
static async * \u{6F}() {
|
||||
return this.#\u{6F};
|
||||
}
|
||||
static async * \u2118(value) {
|
||||
yield * await this.#\u2118(value);
|
||||
static async * \u2118() {
|
||||
return this.#\u2118;
|
||||
}
|
||||
static async * ZW_\u200C_NJ(value) {
|
||||
yield * await this.#ZW_\u200C_NJ(value);
|
||||
static async * ZW_\u200C_NJ() {
|
||||
return this.#ZW_\u200C_NJ;
|
||||
}
|
||||
static async * ZW_\u200D_J(value) {
|
||||
yield * await this.#ZW_\u200D_J(value);
|
||||
static async * ZW_\u200D_J() {
|
||||
return this.#ZW_\u200D_J;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -64,42 +64,42 @@ var C = class {
|
|||
foo = "foobar";
|
||||
m() { return 42 }
|
||||
static * #$(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #_(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #o(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #℘(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW__NJ(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW__J(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
m2() { return 39 }
|
||||
bar = "barbaz";
|
||||
static * $(value) {
|
||||
yield this.#$(value);
|
||||
static get $() {
|
||||
return this.#$;
|
||||
}
|
||||
static * _(value) {
|
||||
yield this.#_(value);
|
||||
static get _() {
|
||||
return this.#_;
|
||||
}
|
||||
static * o(value) {
|
||||
yield this.#o(value);
|
||||
static get o() {
|
||||
return this.#o;
|
||||
}
|
||||
static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield this.#℘(value);
|
||||
static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#℘;
|
||||
}
|
||||
static * ZW__NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield this.#ZW__NJ(value);
|
||||
static get ZW__NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__NJ;
|
||||
}
|
||||
static * ZW__J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield this.#ZW__J(value);
|
||||
static get ZW__J() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__J;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -64,42 +64,42 @@ var C = class {
|
|||
foo = "foobar";
|
||||
m() { return 42 }
|
||||
static * #$(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #_(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #\u{6F}(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #\u2118(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW_\u200C_NJ(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW_\u200D_J(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
m2() { return 39 }
|
||||
bar = "barbaz";
|
||||
static * $(value) {
|
||||
yield this.#$(value);
|
||||
static get $() {
|
||||
return this.#$;
|
||||
}
|
||||
static * _(value) {
|
||||
yield this.#_(value);
|
||||
static get _() {
|
||||
return this.#_;
|
||||
}
|
||||
static * \u{6F}(value) {
|
||||
yield this.#\u{6F}(value);
|
||||
static get \u{6F}() {
|
||||
return this.#\u{6F};
|
||||
}
|
||||
static * \u2118(value) {
|
||||
yield this.#\u2118(value);
|
||||
static get \u2118() {
|
||||
return this.#\u2118;
|
||||
}
|
||||
static * ZW_\u200C_NJ(value) {
|
||||
yield this.#ZW_\u200C_NJ(value);
|
||||
static get ZW_\u200C_NJ() {
|
||||
return this.#ZW_\u200C_NJ;
|
||||
}
|
||||
static * ZW_\u200D_J(value) {
|
||||
yield this.#ZW_\u200D_J(value);
|
||||
static get ZW_\u200D_J() {
|
||||
return this.#ZW_\u200D_J;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,119 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-private-methods-with-fields.case
|
||||
// - src/class-fields/productions/cls-expr-multiple-definitions.template
|
||||
/*---
|
||||
description: static private methods with fields (multiple fields definitions)
|
||||
esid: prod-FieldDefinition
|
||||
features: [class-static-methods-private, class-static-fields-private, class, class-fields-public]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement :
|
||||
...
|
||||
static FieldDefinition ;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName :
|
||||
PrivateName
|
||||
|
||||
PrivateName :
|
||||
# IdentifierName
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var C = class {
|
||||
foo = "foobar";
|
||||
m() { return 42 }
|
||||
static #xVal; static #yVal
|
||||
m2() { return 39 }
|
||||
bar = "barbaz";
|
||||
static #x(value) {
|
||||
this.#xVal = value;
|
||||
return this.#xVal;
|
||||
}
|
||||
static #y(value) {
|
||||
this.#yVal = value;
|
||||
return this.#yVal;
|
||||
}
|
||||
static x() {
|
||||
return this.#x(42);
|
||||
}
|
||||
static y() {
|
||||
return this.#y(43);
|
||||
}
|
||||
}
|
||||
|
||||
var c = new C();
|
||||
|
||||
assert.sameValue(c.m(), 42);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "m"), false);
|
||||
assert.sameValue(c.m, C.prototype.m);
|
||||
|
||||
verifyProperty(C.prototype, "m", {
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
});
|
||||
|
||||
assert.sameValue(c.m2(), 39);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false);
|
||||
assert.sameValue(c.m2, C.prototype.m2);
|
||||
|
||||
verifyProperty(C.prototype, "m2", {
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
});
|
||||
|
||||
assert.sameValue(c.foo, "foobar");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false);
|
||||
|
||||
verifyProperty(c, "foo", {
|
||||
value: "foobar",
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
});
|
||||
|
||||
assert.sameValue(c.bar, "barbaz");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false);
|
||||
|
||||
verifyProperty(c, "bar", {
|
||||
value: "barbaz",
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
});
|
||||
|
||||
// Test the private methods do not appear as properties before set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#xVal"), false, "test 7");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#xVal"), false, "test 8");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#xVal"), false, "test 9");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#yVal"), false, "test 10");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#yVal"), false, "test 11");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#yVal"), false, "test 12");
|
||||
|
||||
// Test if private fields can be sucessfully accessed and set to value
|
||||
assert.sameValue(C.x(), 42, "test 13");
|
||||
assert.sameValue(C.y(), 43, "test 14");
|
||||
|
||||
// Test the private fields do not appear as properties before after set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 15");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 16");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#xVal"), false, "test 17");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#yVal"), false, "test 18");
|
|
@ -27,19 +27,17 @@ info: |
|
|||
var C = class {
|
||||
foo = "foobar";
|
||||
m() { return 42 }
|
||||
static #xVal; static #yVal
|
||||
|
||||
m2() { return 39 }
|
||||
bar = "barbaz";
|
||||
static #x(value) {
|
||||
this.#xVal = value;
|
||||
return this.#xVal;
|
||||
return value / 2;
|
||||
}
|
||||
static #y(value) {
|
||||
this.#y = value;
|
||||
return this.#yVal;
|
||||
return value * 2;
|
||||
}
|
||||
static x() {
|
||||
return this.#x(42);
|
||||
return this.#x(84);
|
||||
}
|
||||
static y() {
|
||||
return this.#y(43);
|
||||
|
@ -91,18 +89,18 @@ verifyProperty(c, "bar", {
|
|||
});
|
||||
|
||||
// Test the private methods do not appear as properties before set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#xVal"), false, "test 1");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#xVal"), false, "test 2");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#xVal"), false, "test 3");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#yVal"), false, "test 4");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#yVal"), false, "test 5");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#yVal"), false, "test 6");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6");
|
||||
|
||||
// Test if private fields can be sucessfully accessed and set to value
|
||||
assert.sameValue(C.x(), 42, "test 7");
|
||||
assert.sameValue(C.y(), 43, "test 8");
|
||||
assert.sameValue(C.y(), 86, "test 8");
|
||||
|
||||
// Test the private fields do not appear as properties before after set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#xVal"), false, "test 9");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#yVal"), false, "test 10");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10");
|
||||
|
|
|
@ -61,43 +61,43 @@ info: |
|
|||
|
||||
|
||||
var C = class {
|
||||
static async #$(value) {
|
||||
static async * #$(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #_(value) {
|
||||
static async * #_(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #o(value) {
|
||||
static async * #o(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #℘(value) {
|
||||
static async * #℘(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #ZW__NJ(value) {
|
||||
static async * #ZW__NJ(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #ZW__J(value) {
|
||||
static async * #ZW__J(value) {
|
||||
yield await value;
|
||||
}
|
||||
foo = "foobar"
|
||||
bar = "barbaz";
|
||||
static async $(value) {
|
||||
yield * await this.#$(value);
|
||||
static get $() {
|
||||
return this.#$;
|
||||
}
|
||||
static async _(value) {
|
||||
yield * await this.#_(value);
|
||||
static get _() {
|
||||
return this.#_;
|
||||
}
|
||||
static async o(value) {
|
||||
yield * await this.#o(value);
|
||||
static get o() {
|
||||
return this.#o;
|
||||
}
|
||||
static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield * await this.#℘(value);
|
||||
static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#℘;
|
||||
}
|
||||
static async ZW__NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield * await this.#ZW__NJ(value);
|
||||
static get ZW__NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__NJ;
|
||||
}
|
||||
static async ZW__J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield * await this.#ZW__J(value);
|
||||
static get ZW__J() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__J;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -62,42 +62,42 @@ info: |
|
|||
|
||||
var C = class {
|
||||
static async * #$(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #_(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #\u{6F}(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #\u2118(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #ZW_\u200C_NJ(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #ZW_\u200D_J(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
foo = "foobar"
|
||||
bar = "barbaz";
|
||||
static async * $(value) {
|
||||
yield * await this.#$(value);
|
||||
static async * $() {
|
||||
return this.#$;
|
||||
}
|
||||
static async * _(value) {
|
||||
yield * await this.#_(value);
|
||||
static async * _() {
|
||||
return this.#_;
|
||||
}
|
||||
static async * \u{6F}(value) {
|
||||
yield * await this.#\u{6F}(value);
|
||||
static async * \u{6F}() {
|
||||
return this.#\u{6F};
|
||||
}
|
||||
static async * \u2118(value) {
|
||||
yield * await this.#\u2118(value);
|
||||
static async * \u2118() {
|
||||
return this.#\u2118;
|
||||
}
|
||||
static async * ZW_\u200C_NJ(value) {
|
||||
yield * await this.#ZW_\u200C_NJ(value);
|
||||
static async * ZW_\u200C_NJ() {
|
||||
return this.#ZW_\u200C_NJ;
|
||||
}
|
||||
static async * ZW_\u200D_J(value) {
|
||||
yield * await this.#ZW_\u200D_J(value);
|
||||
static async * ZW_\u200D_J() {
|
||||
return this.#ZW_\u200D_J;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -62,42 +62,42 @@ info: |
|
|||
|
||||
var C = class {
|
||||
static * #$(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #_(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #o(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #℘(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW__NJ(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW__J(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
foo = "foobar"
|
||||
bar = "barbaz";
|
||||
static * $(value) {
|
||||
yield this.#$(value);
|
||||
static get $() {
|
||||
return this.#$;
|
||||
}
|
||||
static * _(value) {
|
||||
yield this.#_(value);
|
||||
static get _() {
|
||||
return this.#_;
|
||||
}
|
||||
static * o(value) {
|
||||
yield this.#o(value);
|
||||
static get o() {
|
||||
return this.#o;
|
||||
}
|
||||
static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield this.#℘(value);
|
||||
static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#℘;
|
||||
}
|
||||
static * ZW__NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield this.#ZW__NJ(value);
|
||||
static get ZW__NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__NJ;
|
||||
}
|
||||
static * ZW__J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield this.#ZW__J(value);
|
||||
static get ZW__J() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__J;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -62,42 +62,42 @@ info: |
|
|||
|
||||
var C = class {
|
||||
static * #$(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #_(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #\u{6F}(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #\u2118(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW_\u200C_NJ(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW_\u200D_J(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
foo = "foobar"
|
||||
bar = "barbaz";
|
||||
static * $(value) {
|
||||
yield this.#$(value);
|
||||
static get $() {
|
||||
return this.#$;
|
||||
}
|
||||
static * _(value) {
|
||||
yield this.#_(value);
|
||||
static get _() {
|
||||
return this.#_;
|
||||
}
|
||||
static * \u{6F}(value) {
|
||||
yield this.#\u{6F}(value);
|
||||
static get \u{6F}() {
|
||||
return this.#\u{6F};
|
||||
}
|
||||
static * \u2118(value) {
|
||||
yield this.#\u2118(value);
|
||||
static get \u2118() {
|
||||
return this.#\u2118;
|
||||
}
|
||||
static * ZW_\u200C_NJ(value) {
|
||||
yield this.#ZW_\u200C_NJ(value);
|
||||
static get ZW_\u200C_NJ() {
|
||||
return this.#ZW_\u200C_NJ;
|
||||
}
|
||||
static * ZW_\u200D_J(value) {
|
||||
yield this.#ZW_\u200D_J(value);
|
||||
static get ZW_\u200D_J() {
|
||||
return this.#ZW_\u200D_J;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,97 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-private-methods-with-fields.case
|
||||
// - src/class-fields/productions/cls-expr-multiple-stacked-definitions.template
|
||||
/*---
|
||||
description: static private methods with fields (multiple stacked fields definitions through ASI)
|
||||
esid: prod-FieldDefinition
|
||||
features: [class-static-methods-private, class-static-fields-private, class, class-fields-public]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
ClassElement :
|
||||
...
|
||||
static FieldDefinition ;
|
||||
|
||||
FieldDefinition :
|
||||
ClassElementName Initializer_opt
|
||||
|
||||
ClassElementName :
|
||||
PrivateName
|
||||
|
||||
PrivateName :
|
||||
# IdentifierName
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var C = class {
|
||||
static #xVal; static #yVal
|
||||
foo = "foobar"
|
||||
bar = "barbaz";
|
||||
static #x(value) {
|
||||
this.#xVal = value;
|
||||
return this.#xVal;
|
||||
}
|
||||
static #y(value) {
|
||||
this.#yVal = value;
|
||||
return this.#yVal;
|
||||
}
|
||||
static x() {
|
||||
return this.#x(42);
|
||||
}
|
||||
static y() {
|
||||
return this.#y(43);
|
||||
}
|
||||
}
|
||||
|
||||
var c = new C();
|
||||
|
||||
assert.sameValue(c.foo, "foobar");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false);
|
||||
|
||||
verifyProperty(c, "foo", {
|
||||
value: "foobar",
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
});
|
||||
|
||||
assert.sameValue(c.bar, "barbaz");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false);
|
||||
|
||||
verifyProperty(c, "bar", {
|
||||
value: "barbaz",
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
});
|
||||
|
||||
// Test the private methods do not appear as properties before set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#xVal"), false, "test 7");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#xVal"), false, "test 8");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#xVal"), false, "test 9");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#yVal"), false, "test 10");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#yVal"), false, "test 11");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#yVal"), false, "test 12");
|
||||
|
||||
// Test if private fields can be sucessfully accessed and set to value
|
||||
assert.sameValue(C.x(), 42, "test 13");
|
||||
assert.sameValue(C.y(), 43, "test 14");
|
||||
|
||||
// Test the private fields do not appear as properties before after set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 15");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 16");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#xVal"), false, "test 17");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#yVal"), false, "test 18");
|
|
@ -25,19 +25,17 @@ info: |
|
|||
|
||||
|
||||
var C = class {
|
||||
static #xVal; static #yVal
|
||||
|
||||
foo = "foobar"
|
||||
bar = "barbaz";
|
||||
static #x(value) {
|
||||
this.#xVal = value;
|
||||
return this.#xVal;
|
||||
return value / 2;
|
||||
}
|
||||
static #y(value) {
|
||||
this.#y = value;
|
||||
return this.#yVal;
|
||||
return value * 2;
|
||||
}
|
||||
static x() {
|
||||
return this.#x(42);
|
||||
return this.#x(84);
|
||||
}
|
||||
static y() {
|
||||
return this.#y(43);
|
||||
|
@ -69,18 +67,18 @@ verifyProperty(c, "bar", {
|
|||
});
|
||||
|
||||
// Test the private methods do not appear as properties before set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#xVal"), false, "test 1");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#xVal"), false, "test 2");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#xVal"), false, "test 3");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#x"), false, "test 1");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 2");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#x"), false, "test 3");
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#yVal"), false, "test 4");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#yVal"), false, "test 5");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#yVal"), false, "test 6");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "#y"), false, "test 4");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 5");
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, "#y"), false, "test 6");
|
||||
|
||||
// Test if private fields can be sucessfully accessed and set to value
|
||||
assert.sameValue(C.x(), 42, "test 7");
|
||||
assert.sameValue(C.y(), 43, "test 8");
|
||||
assert.sameValue(C.y(), 86, "test 8");
|
||||
|
||||
// Test the private fields do not appear as properties before after set to value
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#xVal"), false, "test 9");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#yVal"), false, "test 10");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#x"), false, "test 9");
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "#y"), false, "test 10");
|
||||
|
|
|
@ -61,42 +61,42 @@ info: |
|
|||
|
||||
|
||||
var C = class {
|
||||
static async #$(value) {
|
||||
static async * #$(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #_(value) {
|
||||
static async * #_(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #o(value) {
|
||||
static async * #o(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #℘(value) {
|
||||
static async * #℘(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #ZW__NJ(value) {
|
||||
static async * #ZW__NJ(value) {
|
||||
yield await value;
|
||||
}
|
||||
static async #ZW__J(value) {
|
||||
static async * #ZW__J(value) {
|
||||
yield await value;
|
||||
}
|
||||
m() { return 42; }
|
||||
static async $(value) {
|
||||
yield * await this.#$(value);
|
||||
static get $() {
|
||||
return this.#$;
|
||||
}
|
||||
static async _(value) {
|
||||
yield * await this.#_(value);
|
||||
static get _() {
|
||||
return this.#_;
|
||||
}
|
||||
static async o(value) {
|
||||
yield * await this.#o(value);
|
||||
static get o() {
|
||||
return this.#o;
|
||||
}
|
||||
static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield * await this.#℘(value);
|
||||
static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#℘;
|
||||
}
|
||||
static async ZW__NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield * await this.#ZW__NJ(value);
|
||||
static get ZW__NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__NJ;
|
||||
}
|
||||
static async ZW__J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield * await this.#ZW__J(value);
|
||||
static get ZW__J() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__J;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -62,41 +62,41 @@ info: |
|
|||
|
||||
var C = class {
|
||||
static async * #$(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #_(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #\u{6F}(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #\u2118(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #ZW_\u200C_NJ(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
static async * #ZW_\u200D_J(value) {
|
||||
yield await value;
|
||||
yield * await value;
|
||||
}
|
||||
m() { return 42; }
|
||||
static async * $(value) {
|
||||
yield * await this.#$(value);
|
||||
static async * $() {
|
||||
return this.#$;
|
||||
}
|
||||
static async * _(value) {
|
||||
yield * await this.#_(value);
|
||||
static async * _() {
|
||||
return this.#_;
|
||||
}
|
||||
static async * \u{6F}(value) {
|
||||
yield * await this.#\u{6F}(value);
|
||||
static async * \u{6F}() {
|
||||
return this.#\u{6F};
|
||||
}
|
||||
static async * \u2118(value) {
|
||||
yield * await this.#\u2118(value);
|
||||
static async * \u2118() {
|
||||
return this.#\u2118;
|
||||
}
|
||||
static async * ZW_\u200C_NJ(value) {
|
||||
yield * await this.#ZW_\u200C_NJ(value);
|
||||
static async * ZW_\u200C_NJ() {
|
||||
return this.#ZW_\u200C_NJ;
|
||||
}
|
||||
static async * ZW_\u200D_J(value) {
|
||||
yield * await this.#ZW_\u200D_J(value);
|
||||
static async * ZW_\u200D_J() {
|
||||
return this.#ZW_\u200D_J;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -62,41 +62,41 @@ info: |
|
|||
|
||||
var C = class {
|
||||
static * #$(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #_(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #o(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #℘(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW__NJ(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW__J(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
m() { return 42; }
|
||||
static * $(value) {
|
||||
yield this.#$(value);
|
||||
static get $() {
|
||||
return this.#$;
|
||||
}
|
||||
static * _(value) {
|
||||
yield this.#_(value);
|
||||
static get _() {
|
||||
return this.#_;
|
||||
}
|
||||
static * o(value) {
|
||||
yield this.#o(value);
|
||||
static get o() {
|
||||
return this.#o;
|
||||
}
|
||||
static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield this.#℘(value);
|
||||
static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#℘;
|
||||
}
|
||||
static * ZW__NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield this.#ZW__NJ(value);
|
||||
static get ZW__NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__NJ;
|
||||
}
|
||||
static * ZW__J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
yield this.#ZW__J(value);
|
||||
static get ZW__J() { // DO NOT CHANGE THE NAME OF THIS FIELD
|
||||
return this.#ZW__J;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -62,41 +62,41 @@ info: |
|
|||
|
||||
var C = class {
|
||||
static * #$(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #_(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #\u{6F}(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #\u2118(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW_\u200C_NJ(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
static * #ZW_\u200D_J(value) {
|
||||
yield value;
|
||||
yield * value;
|
||||
}
|
||||
m() { return 42; }
|
||||
static * $(value) {
|
||||
yield this.#$(value);
|
||||
static get $() {
|
||||
return this.#$;
|
||||
}
|
||||
static * _(value) {
|
||||
yield this.#_(value);
|
||||
static get _() {
|
||||
return this.#_;
|
||||
}
|
||||
static * \u{6F}(value) {
|
||||
yield this.#\u{6F}(value);
|
||||
static get \u{6F}() {
|
||||
return this.#\u{6F};
|
||||
}
|
||||
static * \u2118(value) {
|
||||
yield this.#\u2118(value);
|
||||
static get \u2118() {
|
||||
return this.#\u2118;
|
||||
}
|
||||
static * ZW_\u200C_NJ(value) {
|
||||
yield this.#ZW_\u200C_NJ(value);
|
||||
static get ZW_\u200C_NJ() {
|
||||
return this.#ZW_\u200C_NJ;
|
||||
}
|
||||
static * ZW_\u200D_J(value) {
|
||||
yield this.#ZW_\u200D_J(value);
|
||||
static get ZW_\u200D_J() {
|
||||
return this.#ZW_\u200D_J;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue