Skip to content
Snippets Groups Projects
Commit 79fd1b2c authored by Leo Balter's avatar Leo Balter Committed by Rick Waldron
Browse files

Generate tests

parent af77d964
No related branches found
No related tags found
No related merge requests found
...@@ -95,6 +95,7 @@ var C = class { ...@@ -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'); 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(typeof this.#m, 'function');
assert.sameValue(this.ref, this.#m, 'returns the same value'); 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 ctorIter = this.#m();
var p = ctorIter.next(); var p = ctorIter.next();
......
...@@ -95,6 +95,7 @@ var C = class { ...@@ -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'); 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(typeof this.#m, 'function');
assert.sameValue(this.ref, this.#m, 'returns the same value'); 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'); assert.sameValue(this.#m.name, '#m', 'function name inside constructor');
ctorPromise = this.#m().then(value => { ctorPromise = this.#m().then(value => {
......
...@@ -93,6 +93,7 @@ var C = class { ...@@ -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'); 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(typeof this.#m, 'function');
assert.sameValue(this.ref, this.#m, 'returns the same value'); 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(); var res = this.#m().next();
assert.sameValue(res.value, 42, 'return from generator method, inside ctor'); assert.sameValue(res.value, 42, 'return from generator method, inside ctor');
......
...@@ -93,6 +93,7 @@ var C = class { ...@@ -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'); 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(typeof this.#m, 'function');
assert.sameValue(this.ref, this.#m, 'returns the same value'); 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(), 42, 'already defined in the ctor');
assert.sameValue(this.#m.name, '#m', 'function name inside constructor'); assert.sameValue(this.#m.name, '#m', 'function name inside constructor');
......
...@@ -94,6 +94,7 @@ class C { ...@@ -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'); 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(typeof this.#m, 'function');
assert.sameValue(this.ref, this.#m, 'returns the same value'); 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 ctorIter = this.#m();
var p = ctorIter.next(); var p = ctorIter.next();
......
...@@ -94,6 +94,7 @@ class C { ...@@ -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'); 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(typeof this.#m, 'function');
assert.sameValue(this.ref, this.#m, 'returns the same value'); 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'); assert.sameValue(this.#m.name, '#m', 'function name inside constructor');
ctorPromise = this.#m().then(value => { ctorPromise = this.#m().then(value => {
......
...@@ -92,6 +92,7 @@ class C { ...@@ -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'); 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(typeof this.#m, 'function');
assert.sameValue(this.ref, this.#m, 'returns the same value'); 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(); var res = this.#m().next();
assert.sameValue(res.value, 42, 'return from generator method, inside ctor'); assert.sameValue(res.value, 42, 'return from generator method, inside ctor');
......
...@@ -92,6 +92,7 @@ class C { ...@@ -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'); 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(typeof this.#m, 'function');
assert.sameValue(this.ref, this.#m, 'returns the same value'); 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(), 42, 'already defined in the ctor');
assert.sameValue(this.#m.name, '#m', 'function name inside constructor'); assert.sameValue(this.#m.name, '#m', 'function name inside constructor');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment