mirror of https://github.com/tc39/test262.git
Generate tests
This commit is contained in:
parent
ec1d7ccc6f
commit
019322b114
|
@ -1,6 +1,6 @@
|
||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/dynamic-import/imported-Symbol-toStringTag.case
|
// - src/dynamic-import/ns-Symbol-toStringTag.case
|
||||||
// - src/dynamic-import/module-namespace-object/await.template
|
// - src/dynamic-import/namespace/await.template
|
||||||
/*---
|
/*---
|
||||||
description: Module namespace objects have a Symbol.toStringTag (value from await resolving)
|
description: Module namespace objects have a Symbol.toStringTag (value from await resolving)
|
||||||
esid: sec-finishdynamicimport
|
esid: sec-finishdynamicimport
|
||||||
|
@ -80,15 +80,15 @@ info: |
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
async function fn() {
|
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
|
// propertyHelper.js is not appropriate for this test because it assumes that
|
||||||
// the object exposes the ordinary object's implementation of [[Get]], [[Set]],
|
// the object exposes the ordinary object's implementation of [[Get]], [[Set]],
|
||||||
// [[Delete]], and [[OwnPropertyKeys]], which the module namespace exotic
|
// [[Delete]], and [[OwnPropertyKeys]], which the module namespace exotic
|
||||||
// object does not.
|
// 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.enumerable, false, 'reports as non-enumerable');
|
||||||
assert.sameValue(desc.writable, false, 'reports as non-writable');
|
assert.sameValue(desc.writable, false, 'reports as non-writable');
|
|
@ -1,6 +1,6 @@
|
||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/dynamic-import/imported-extensible.case
|
// - src/dynamic-import/ns-extensible.case
|
||||||
// - src/dynamic-import/module-namespace-object/await.template
|
// - src/dynamic-import/namespace/await.template
|
||||||
/*---
|
/*---
|
||||||
description: Module namespace objects are not extensible. (value from await resolving)
|
description: Module namespace objects are not extensible. (value from await resolving)
|
||||||
esid: sec-finishdynamicimport
|
esid: sec-finishdynamicimport
|
||||||
|
@ -73,9 +73,9 @@ info: |
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
async function fn() {
|
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);
|
fn().then($DONE, $DONE).catch($DONE);
|
|
@ -1,6 +1,6 @@
|
||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/dynamic-import/imported-no-iterator.case
|
// - src/dynamic-import/ns-no-iterator.case
|
||||||
// - src/dynamic-import/module-namespace-object/await.template
|
// - src/dynamic-import/namespace/await.template
|
||||||
/*---
|
/*---
|
||||||
description: Module namespace objects lack a Symbol.toStringTag (value from await resolving)
|
description: Module namespace objects lack a Symbol.toStringTag (value from await resolving)
|
||||||
esid: sec-finishdynamicimport
|
esid: sec-finishdynamicimport
|
||||||
|
@ -72,9 +72,9 @@ info: |
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
async function fn() {
|
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);
|
fn().then($DONE, $DONE).catch($DONE);
|
|
@ -1,6 +1,6 @@
|
||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/dynamic-import/imported-prop-descs.case
|
// - src/dynamic-import/ns-prop-descs.case
|
||||||
// - src/dynamic-import/module-namespace-object/await.template
|
// - src/dynamic-import/namespace/await.template
|
||||||
/*---
|
/*---
|
||||||
description: imported object properties descriptors (value from await resolving)
|
description: imported object properties descriptors (value from await resolving)
|
||||||
esid: sec-finishdynamicimport
|
esid: sec-finishdynamicimport
|
||||||
|
@ -72,27 +72,27 @@ info: |
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
async function fn() {
|
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
|
// propertyHelper.js is not appropriate for this test because it assumes that
|
||||||
// the object exposes the ordinary object's implementation of [[Get]], [[Set]],
|
// the object exposes the ordinary object's implementation of [[Get]], [[Set]],
|
||||||
// [[Delete]], and [[OwnPropertyKeys]], which the module namespace exotic
|
// [[Delete]], and [[OwnPropertyKeys]], which the module namespace exotic
|
||||||
// object does not.
|
// 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.value, 42, 'default value is 42');
|
||||||
assert.sameValue(desc.enumerable, true, 'default reports as enumerable');
|
assert.sameValue(desc.enumerable, true, 'default reports as enumerable');
|
||||||
assert.sameValue(desc.writable, true, 'default reports as writable');
|
assert.sameValue(desc.writable, true, 'default reports as writable');
|
||||||
assert.sameValue(desc.configurable, false, 'default reports as non-configurable');
|
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.value, 'Test262', 'x value is "Test262"');
|
||||||
assert.sameValue(desc.enumerable, true, 'x reports as enumerable');
|
assert.sameValue(desc.enumerable, true, 'x reports as enumerable');
|
||||||
assert.sameValue(desc.writable, true, 'x reports as writable');
|
assert.sameValue(desc.writable, true, 'x reports as writable');
|
||||||
assert.sameValue(desc.configurable, false, 'x reports as non-configurable');
|
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.value, 42, 'z value is 42');
|
||||||
assert.sameValue(desc.enumerable, true, 'z reports as enumerable');
|
assert.sameValue(desc.enumerable, true, 'z reports as enumerable');
|
|
@ -1,6 +1,6 @@
|
||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/dynamic-import/imported-prototype.case
|
// - src/dynamic-import/ns-prototype.case
|
||||||
// - src/dynamic-import/module-namespace-object/await.template
|
// - src/dynamic-import/namespace/await.template
|
||||||
/*---
|
/*---
|
||||||
description: Module namespace object prototype is null (value from await resolving)
|
description: Module namespace object prototype is null (value from await resolving)
|
||||||
esid: sec-finishdynamicimport
|
esid: sec-finishdynamicimport
|
||||||
|
@ -72,9 +72,9 @@ info: |
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
async function fn() {
|
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);
|
fn().then($DONE, $DONE).catch($DONE);
|
|
@ -1,6 +1,6 @@
|
||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/dynamic-import/imported-Symbol-toStringTag.case
|
// - src/dynamic-import/ns-Symbol-toStringTag.case
|
||||||
// - src/dynamic-import/module-namespace-object/promise.template
|
// - src/dynamic-import/namespace/promise.template
|
||||||
/*---
|
/*---
|
||||||
description: Module namespace objects have a Symbol.toStringTag (value from promise then)
|
description: Module namespace objects have a Symbol.toStringTag (value from promise then)
|
||||||
esid: sec-finishdynamicimport
|
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
|
// propertyHelper.js is not appropriate for this test because it assumes that
|
||||||
// the object exposes the ordinary object's implementation of [[Get]], [[Set]],
|
// the object exposes the ordinary object's implementation of [[Get]], [[Set]],
|
||||||
// [[Delete]], and [[OwnPropertyKeys]], which the module namespace exotic
|
// [[Delete]], and [[OwnPropertyKeys]], which the module namespace exotic
|
||||||
// object does not.
|
// 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.enumerable, false, 'reports as non-enumerable');
|
||||||
assert.sameValue(desc.writable, false, 'reports as non-writable');
|
assert.sameValue(desc.writable, false, 'reports as non-writable');
|
|
@ -1,6 +1,6 @@
|
||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/dynamic-import/imported-extensible.case
|
// - src/dynamic-import/ns-extensible.case
|
||||||
// - src/dynamic-import/module-namespace-object/promise.template
|
// - src/dynamic-import/namespace/promise.template
|
||||||
/*---
|
/*---
|
||||||
description: Module namespace objects are not extensible. (value from promise then)
|
description: Module namespace objects are not extensible. (value from promise then)
|
||||||
esid: sec-finishdynamicimport
|
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);
|
}).then($DONE, $DONE).catch($DONE);
|
|
@ -1,6 +1,6 @@
|
||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/dynamic-import/imported-no-iterator.case
|
// - src/dynamic-import/ns-no-iterator.case
|
||||||
// - src/dynamic-import/module-namespace-object/promise.template
|
// - src/dynamic-import/namespace/promise.template
|
||||||
/*---
|
/*---
|
||||||
description: Module namespace objects lack a Symbol.toStringTag (value from promise then)
|
description: Module namespace objects lack a Symbol.toStringTag (value from promise then)
|
||||||
esid: sec-finishdynamicimport
|
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);
|
}).then($DONE, $DONE).catch($DONE);
|
|
@ -1,6 +1,6 @@
|
||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/dynamic-import/imported-prop-descs.case
|
// - src/dynamic-import/ns-prop-descs.case
|
||||||
// - src/dynamic-import/module-namespace-object/promise.template
|
// - src/dynamic-import/namespace/promise.template
|
||||||
/*---
|
/*---
|
||||||
description: imported object properties descriptors (value from promise then)
|
description: imported object properties descriptors (value from promise then)
|
||||||
esid: sec-finishdynamicimport
|
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
|
// propertyHelper.js is not appropriate for this test because it assumes that
|
||||||
// the object exposes the ordinary object's implementation of [[Get]], [[Set]],
|
// the object exposes the ordinary object's implementation of [[Get]], [[Set]],
|
||||||
// [[Delete]], and [[OwnPropertyKeys]], which the module namespace exotic
|
// [[Delete]], and [[OwnPropertyKeys]], which the module namespace exotic
|
||||||
// object does not.
|
// 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.value, 42, 'default value is 42');
|
||||||
assert.sameValue(desc.enumerable, true, 'default reports as enumerable');
|
assert.sameValue(desc.enumerable, true, 'default reports as enumerable');
|
||||||
assert.sameValue(desc.writable, true, 'default reports as writable');
|
assert.sameValue(desc.writable, true, 'default reports as writable');
|
||||||
assert.sameValue(desc.configurable, false, 'default reports as non-configurable');
|
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.value, 'Test262', 'x value is "Test262"');
|
||||||
assert.sameValue(desc.enumerable, true, 'x reports as enumerable');
|
assert.sameValue(desc.enumerable, true, 'x reports as enumerable');
|
||||||
assert.sameValue(desc.writable, true, 'x reports as writable');
|
assert.sameValue(desc.writable, true, 'x reports as writable');
|
||||||
assert.sameValue(desc.configurable, false, 'x reports as non-configurable');
|
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.value, 42, 'z value is 42');
|
||||||
assert.sameValue(desc.enumerable, true, 'z reports as enumerable');
|
assert.sameValue(desc.enumerable, true, 'z reports as enumerable');
|
|
@ -1,6 +1,6 @@
|
||||||
// This file was procedurally generated from the following sources:
|
// This file was procedurally generated from the following sources:
|
||||||
// - src/dynamic-import/imported-prototype.case
|
// - src/dynamic-import/ns-prototype.case
|
||||||
// - src/dynamic-import/module-namespace-object/promise.template
|
// - src/dynamic-import/namespace/promise.template
|
||||||
/*---
|
/*---
|
||||||
description: Module namespace object prototype is null (value from promise then)
|
description: Module namespace object prototype is null (value from promise then)
|
||||||
esid: sec-finishdynamicimport
|
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);
|
}).then($DONE, $DONE).catch($DONE);
|
Loading…
Reference in New Issue