Generate tests

This commit is contained in:
Leo Balter 2018-11-26 19:16:30 -05:00 committed by Rick Waldron
parent af77d96453
commit 79fd1b2c76
8 changed files with 8 additions and 0 deletions

View File

@ -95,6 +95,7 @@ var C = class {
hasProp(this, '#m', false, 'private methods are defined in an special internal slot and cannot be found as own properties');
assert.sameValue(typeof this.#m, 'function');
assert.sameValue(this.ref, this.#m, 'returns the same value');
assert.sameValue(this.#m, (() => this)().#m, 'memberexpression and call expression forms');
var ctorIter = this.#m();
var p = ctorIter.next();

View File

@ -95,6 +95,7 @@ var C = class {
hasProp(this, '#m', false, 'private methods are defined in an special internal slot and cannot be found as own properties');
assert.sameValue(typeof this.#m, 'function');
assert.sameValue(this.ref, this.#m, 'returns the same value');
assert.sameValue(this.#m, (() => this)().#m, 'memberexpression and call expression forms');
assert.sameValue(this.#m.name, '#m', 'function name inside constructor');
ctorPromise = this.#m().then(value => {

View File

@ -93,6 +93,7 @@ var C = class {
hasProp(this, '#m', false, 'private methods are defined in an special internal slot and cannot be found as own properties');
assert.sameValue(typeof this.#m, 'function');
assert.sameValue(this.ref, this.#m, 'returns the same value');
assert.sameValue(this.#m, (() => this)().#m, 'memberexpression and call expression forms');
var res = this.#m().next();
assert.sameValue(res.value, 42, 'return from generator method, inside ctor');

View File

@ -93,6 +93,7 @@ var C = class {
hasProp(this, '#m', false, 'private methods are defined in an special internal slot and cannot be found as own properties');
assert.sameValue(typeof this.#m, 'function');
assert.sameValue(this.ref, this.#m, 'returns the same value');
assert.sameValue(this.#m, (() => this)().#m, 'memberexpression and call expression forms');
assert.sameValue(this.#m(), 42, 'already defined in the ctor');
assert.sameValue(this.#m.name, '#m', 'function name inside constructor');

View File

@ -94,6 +94,7 @@ class C {
hasProp(this, '#m', false, 'private methods are defined in an special internal slot and cannot be found as own properties');
assert.sameValue(typeof this.#m, 'function');
assert.sameValue(this.ref, this.#m, 'returns the same value');
assert.sameValue(this.#m, (() => this)().#m, 'memberexpression and call expression forms');
var ctorIter = this.#m();
var p = ctorIter.next();

View File

@ -94,6 +94,7 @@ class C {
hasProp(this, '#m', false, 'private methods are defined in an special internal slot and cannot be found as own properties');
assert.sameValue(typeof this.#m, 'function');
assert.sameValue(this.ref, this.#m, 'returns the same value');
assert.sameValue(this.#m, (() => this)().#m, 'memberexpression and call expression forms');
assert.sameValue(this.#m.name, '#m', 'function name inside constructor');
ctorPromise = this.#m().then(value => {

View File

@ -92,6 +92,7 @@ class C {
hasProp(this, '#m', false, 'private methods are defined in an special internal slot and cannot be found as own properties');
assert.sameValue(typeof this.#m, 'function');
assert.sameValue(this.ref, this.#m, 'returns the same value');
assert.sameValue(this.#m, (() => this)().#m, 'memberexpression and call expression forms');
var res = this.#m().next();
assert.sameValue(res.value, 42, 'return from generator method, inside ctor');

View File

@ -92,6 +92,7 @@ class C {
hasProp(this, '#m', false, 'private methods are defined in an special internal slot and cannot be found as own properties');
assert.sameValue(typeof this.#m, 'function');
assert.sameValue(this.ref, this.#m, 'returns the same value');
assert.sameValue(this.#m, (() => this)().#m, 'memberexpression and call expression forms');
assert.sameValue(this.#m(), 42, 'already defined in the ctor');
assert.sameValue(this.#m.name, '#m', 'function name inside constructor');