Generate tests

This commit is contained in:
Leo Balter 2018-10-09 18:08:17 -04:00
parent ec1d7ccc6f
commit 019322b114
10 changed files with 46 additions and 46 deletions

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/imported-Symbol-toStringTag.case
// - src/dynamic-import/module-namespace-object/await.template
// - src/dynamic-import/ns-Symbol-toStringTag.case
// - src/dynamic-import/namespace/await.template
/*---
description: Module namespace objects have a Symbol.toStringTag (value from await resolving)
esid: sec-finishdynamicimport
@ -80,15 +80,15 @@ info: |
---*/
async function fn() {
const imported = await import('./module-code_FIXTURE.js');
const ns = await import('./module-code_FIXTURE.js');
assert.sameValue(imported[Symbol.toStringTag], 'Module');
assert.sameValue(ns[Symbol.toStringTag], 'Module');
// propertyHelper.js is not appropriate for this test because it assumes that
// the object exposes the ordinary object's implementation of [[Get]], [[Set]],
// [[Delete]], and [[OwnPropertyKeys]], which the module namespace exotic
// object does not.
var desc = Object.getOwnPropertyDescriptor(imported, Symbol.toStringTag);
var desc = Object.getOwnPropertyDescriptor(ns, Symbol.toStringTag);
assert.sameValue(desc.enumerable, false, 'reports as non-enumerable');
assert.sameValue(desc.writable, false, 'reports as non-writable');

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/imported-extensible.case
// - src/dynamic-import/module-namespace-object/await.template
// - src/dynamic-import/ns-extensible.case
// - src/dynamic-import/namespace/await.template
/*---
description: Module namespace objects are not extensible. (value from await resolving)
esid: sec-finishdynamicimport
@ -73,9 +73,9 @@ info: |
---*/
async function fn() {
const imported = await import('./module-code_FIXTURE.js');
const ns = await import('./module-code_FIXTURE.js');
assert.sameValue(Object.isExtensible(imported), false);
assert.sameValue(Object.isExtensible(ns), false);
}
fn().then($DONE, $DONE).catch($DONE);

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/imported-no-iterator.case
// - src/dynamic-import/module-namespace-object/await.template
// - src/dynamic-import/ns-no-iterator.case
// - src/dynamic-import/namespace/await.template
/*---
description: Module namespace objects lack a Symbol.toStringTag (value from await resolving)
esid: sec-finishdynamicimport
@ -72,9 +72,9 @@ info: |
---*/
async function fn() {
const imported = await import('./module-code_FIXTURE.js');
const ns = await import('./module-code_FIXTURE.js');
assert.sameValue(Object.prototype.hasOwnProperty.call(imported, Symbol.iterator), false);
assert.sameValue(Object.prototype.hasOwnProperty.call(ns, Symbol.iterator), false);
}
fn().then($DONE, $DONE).catch($DONE);

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/imported-prop-descs.case
// - src/dynamic-import/module-namespace-object/await.template
// - src/dynamic-import/ns-prop-descs.case
// - src/dynamic-import/namespace/await.template
/*---
description: imported object properties descriptors (value from await resolving)
esid: sec-finishdynamicimport
@ -72,27 +72,27 @@ info: |
---*/
async function fn() {
const imported = await import('./module-code_FIXTURE.js');
const ns = await import('./module-code_FIXTURE.js');
// propertyHelper.js is not appropriate for this test because it assumes that
// the object exposes the ordinary object's implementation of [[Get]], [[Set]],
// [[Delete]], and [[OwnPropertyKeys]], which the module namespace exotic
// object does not.
var desc = Object.getOwnPropertyDescriptor(imported, 'default');
var desc = Object.getOwnPropertyDescriptor(ns, 'default');
assert.sameValue(desc.value, 42, 'default value is 42');
assert.sameValue(desc.enumerable, true, 'default reports as enumerable');
assert.sameValue(desc.writable, true, 'default reports as writable');
assert.sameValue(desc.configurable, false, 'default reports as non-configurable');
desc = Object.getOwnPropertyDescriptor(imported, 'x');
desc = Object.getOwnPropertyDescriptor(ns, 'x');
assert.sameValue(desc.value, 'Test262', 'x value is "Test262"');
assert.sameValue(desc.enumerable, true, 'x reports as enumerable');
assert.sameValue(desc.writable, true, 'x reports as writable');
assert.sameValue(desc.configurable, false, 'x reports as non-configurable');
desc = Object.getOwnPropertyDescriptor(imported, 'z');
desc = Object.getOwnPropertyDescriptor(ns, 'z');
assert.sameValue(desc.value, 42, 'z value is 42');
assert.sameValue(desc.enumerable, true, 'z reports as enumerable');

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/imported-prototype.case
// - src/dynamic-import/module-namespace-object/await.template
// - src/dynamic-import/ns-prototype.case
// - src/dynamic-import/namespace/await.template
/*---
description: Module namespace object prototype is null (value from await resolving)
esid: sec-finishdynamicimport
@ -72,9 +72,9 @@ info: |
---*/
async function fn() {
const imported = await import('./module-code_FIXTURE.js');
const ns = await import('./module-code_FIXTURE.js');
assert.sameValue(Object.getPrototypeOf(imported), null, 'prototype is null');
assert.sameValue(Object.getPrototypeOf(ns), null, 'prototype is null');
}
fn().then($DONE, $DONE).catch($DONE);

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/imported-Symbol-toStringTag.case
// - src/dynamic-import/module-namespace-object/promise.template
// - src/dynamic-import/ns-Symbol-toStringTag.case
// - src/dynamic-import/namespace/promise.template
/*---
description: Module namespace objects have a Symbol.toStringTag (value from promise then)
esid: sec-finishdynamicimport
@ -79,15 +79,15 @@ info: |
---*/
import('./module-code_FIXTURE.js').then(imported => {
import('./module-code_FIXTURE.js').then(ns => {
assert.sameValue(imported[Symbol.toStringTag], 'Module');
assert.sameValue(ns[Symbol.toStringTag], 'Module');
// propertyHelper.js is not appropriate for this test because it assumes that
// the object exposes the ordinary object's implementation of [[Get]], [[Set]],
// [[Delete]], and [[OwnPropertyKeys]], which the module namespace exotic
// object does not.
var desc = Object.getOwnPropertyDescriptor(imported, Symbol.toStringTag);
var desc = Object.getOwnPropertyDescriptor(ns, Symbol.toStringTag);
assert.sameValue(desc.enumerable, false, 'reports as non-enumerable');
assert.sameValue(desc.writable, false, 'reports as non-writable');

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/imported-extensible.case
// - src/dynamic-import/module-namespace-object/promise.template
// - src/dynamic-import/ns-extensible.case
// - src/dynamic-import/namespace/promise.template
/*---
description: Module namespace objects are not extensible. (value from promise then)
esid: sec-finishdynamicimport
@ -72,8 +72,8 @@ info: |
---*/
import('./module-code_FIXTURE.js').then(imported => {
import('./module-code_FIXTURE.js').then(ns => {
assert.sameValue(Object.isExtensible(imported), false);
assert.sameValue(Object.isExtensible(ns), false);
}).then($DONE, $DONE).catch($DONE);

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/imported-no-iterator.case
// - src/dynamic-import/module-namespace-object/promise.template
// - src/dynamic-import/ns-no-iterator.case
// - src/dynamic-import/namespace/promise.template
/*---
description: Module namespace objects lack a Symbol.toStringTag (value from promise then)
esid: sec-finishdynamicimport
@ -71,8 +71,8 @@ info: |
---*/
import('./module-code_FIXTURE.js').then(imported => {
import('./module-code_FIXTURE.js').then(ns => {
assert.sameValue(Object.prototype.hasOwnProperty.call(imported, Symbol.iterator), false);
assert.sameValue(Object.prototype.hasOwnProperty.call(ns, Symbol.iterator), false);
}).then($DONE, $DONE).catch($DONE);

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/imported-prop-descs.case
// - src/dynamic-import/module-namespace-object/promise.template
// - src/dynamic-import/ns-prop-descs.case
// - src/dynamic-import/namespace/promise.template
/*---
description: imported object properties descriptors (value from promise then)
esid: sec-finishdynamicimport
@ -71,27 +71,27 @@ info: |
---*/
import('./module-code_FIXTURE.js').then(imported => {
import('./module-code_FIXTURE.js').then(ns => {
// propertyHelper.js is not appropriate for this test because it assumes that
// the object exposes the ordinary object's implementation of [[Get]], [[Set]],
// [[Delete]], and [[OwnPropertyKeys]], which the module namespace exotic
// object does not.
var desc = Object.getOwnPropertyDescriptor(imported, 'default');
var desc = Object.getOwnPropertyDescriptor(ns, 'default');
assert.sameValue(desc.value, 42, 'default value is 42');
assert.sameValue(desc.enumerable, true, 'default reports as enumerable');
assert.sameValue(desc.writable, true, 'default reports as writable');
assert.sameValue(desc.configurable, false, 'default reports as non-configurable');
desc = Object.getOwnPropertyDescriptor(imported, 'x');
desc = Object.getOwnPropertyDescriptor(ns, 'x');
assert.sameValue(desc.value, 'Test262', 'x value is "Test262"');
assert.sameValue(desc.enumerable, true, 'x reports as enumerable');
assert.sameValue(desc.writable, true, 'x reports as writable');
assert.sameValue(desc.configurable, false, 'x reports as non-configurable');
desc = Object.getOwnPropertyDescriptor(imported, 'z');
desc = Object.getOwnPropertyDescriptor(ns, 'z');
assert.sameValue(desc.value, 42, 'z value is 42');
assert.sameValue(desc.enumerable, true, 'z reports as enumerable');

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/imported-prototype.case
// - src/dynamic-import/module-namespace-object/promise.template
// - src/dynamic-import/ns-prototype.case
// - src/dynamic-import/namespace/promise.template
/*---
description: Module namespace object prototype is null (value from promise then)
esid: sec-finishdynamicimport
@ -71,8 +71,8 @@ info: |
---*/
import('./module-code_FIXTURE.js').then(imported => {
import('./module-code_FIXTURE.js').then(ns => {
assert.sameValue(Object.getPrototypeOf(imported), null, 'prototype is null');
assert.sameValue(Object.getPrototypeOf(ns), null, 'prototype is null');
}).then($DONE, $DONE).catch($DONE);