Remove nested-with template for usage/catch tests

This should be well covered in the syntax templates and opens the path for tests with module code restrictions
This commit is contained in:
Leo Balter 2018-10-09 14:16:50 -04:00
parent b0ec060e62
commit f8fda5b6d2
7 changed files with 0 additions and 284 deletions

View File

@ -1,31 +0,0 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/module-code/dynamic-import/catch/nested-with-import-catch-
name: nested with
esid: sec-import-call-runtime-semantics-evaluation
info: |
ImportCall :
import( AssignmentExpression )
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
3. Let argRef be the result of evaluating AssignmentExpression.
4. Let specifier be ? GetValue(argRef).
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
6. Let specifierString be ToString(specifier).
7. IfAbruptRejectPromise(specifierString, promiseCapability).
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
9. Return promiseCapability.[[Promise]].
features: [dynamic-import]
flags: [async, noStrict]
---*/
with ({}) {
/*{ import }*/.catch(error => {
/*{ body }*/
}).then($DONE, $DONE);
}

View File

@ -1,30 +0,0 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/module-code/dynamic-import/usage/nested-with-import-then-
name: nested with
esid: sec-import-call-runtime-semantics-evaluation
info: |
ImportCall :
import( AssignmentExpression )
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
3. Let argRef be the result of evaluating AssignmentExpression.
4. Let specifier be ? GetValue(argRef).
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
6. Let specifierString be ToString(specifier).
7. IfAbruptRejectPromise(specifierString, promiseCapability).
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
9. Return promiseCapability.[[Promise]].
features: [dynamic-import]
flags: [async, noStrict]
---*/
with ({}) {
/*{ import }*/.then(imported => {
/*{ body }*/
}).then($DONE, $DONE).catch($DONE);
}

View File

@ -1,39 +0,0 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/eval-rqstd-abrupt-typeerror.case
// - src/dynamic-import/catch/nested-with.template
/*---
description: Abrupt completion during module evaluation precludes further evaluation (nested with)
esid: sec-import-call-runtime-semantics-evaluation
features: [dynamic-import]
flags: [generated, async, noStrict]
info: |
ImportCall :
import( AssignmentExpression )
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
3. Let argRef be the result of evaluating AssignmentExpression.
4. Let specifier be ? GetValue(argRef).
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
6. Let specifierString be ToString(specifier).
7. IfAbruptRejectPromise(specifierString, promiseCapability).
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
9. Return promiseCapability.[[Promise]].
[...]
6. For each String required that is an element of
module.[[RequestedModules]] do,
a. Let requiredModule be ? HostResolveImportedModule(module, required).
b. Perform ? requiredModule.ModuleEvaluation().
---*/
with ({}) {
import('./eval-rqstd-abrupt-err-type_FIXTURE.js').catch(error => {
assert.sameValue(error.name, 'TypeError');
}).then($DONE, $DONE);
}

View File

@ -1,39 +0,0 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/eval-rqstd-abrupt-urierror.case
// - src/dynamic-import/catch/nested-with.template
/*---
description: Abrupt completion during module evaluation precludes further evaluation (nested with)
esid: sec-import-call-runtime-semantics-evaluation
features: [dynamic-import]
flags: [generated, async, noStrict]
info: |
ImportCall :
import( AssignmentExpression )
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
3. Let argRef be the result of evaluating AssignmentExpression.
4. Let specifier be ? GetValue(argRef).
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
6. Let specifierString be ToString(specifier).
7. IfAbruptRejectPromise(specifierString, promiseCapability).
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
9. Return promiseCapability.[[Promise]].
[...]
6. For each String required that is an element of
module.[[RequestedModules]] do,
a. Let requiredModule be ? HostResolveImportedModule(module, required).
b. Perform ? requiredModule.ModuleEvaluation().
---*/
with ({}) {
import('./eval-rqstd-abrupt-err-uri_FIXTURE.js').catch(error => {
assert.sameValue(error.name, 'URIError');
}).then($DONE, $DONE);
}

View File

@ -1,36 +0,0 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/file-does-not-exist.case
// - src/dynamic-import/catch/nested-with.template
/*---
description: Non existent file can't resolve to a Script or Module Record (nested with)
esid: sec-import-call-runtime-semantics-evaluation
features: [dynamic-import]
flags: [generated, async, noStrict]
info: |
ImportCall :
import( AssignmentExpression )
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
3. Let argRef be the result of evaluating AssignmentExpression.
4. Let specifier be ? GetValue(argRef).
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
6. Let specifierString be ToString(specifier).
7. IfAbruptRejectPromise(specifierString, promiseCapability).
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
9. Return promiseCapability.[[Promise]].
If a Module Record corresponding to the pair referencingModulereferencingScriptOrModule,
specifier does not exist or cannot be created, an exception must be thrown.
---*/
with ({}) {
import('./THIS_FILE_DOES_NOT_EXIST.js').catch(error => {
assert.notSameValue(typeof error, 'undefined');
}).then($DONE, $DONE);
}

View File

@ -1,60 +0,0 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/instn-iee-err-ambiguous-import.case
// - src/dynamic-import/catch/nested-with.template
/*---
description: IndirectExportEntries validation - ambiguous imported bindings (nested with)
esid: sec-import-call-runtime-semantics-evaluation
features: [dynamic-import]
flags: [generated, async, noStrict]
info: |
ImportCall :
import( AssignmentExpression )
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
3. Let argRef be the result of evaluating AssignmentExpression.
4. Let specifier be ? GetValue(argRef).
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
6. Let specifierString be ToString(specifier).
7. IfAbruptRejectPromise(specifierString, promiseCapability).
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
9. Return promiseCapability.[[Promise]].
[...]
9. For each ExportEntry Record e in module.[[IndirectExportEntries]], do
a. Let resolution be ? module.ResolveExport(e.[[ExportName]], « », « »).
b. If resolution is null or resolution is "ambiguous", throw a
SyntaxError exception.
[...]
15.2.1.16.3 ResolveExport
[...]
9. Let starResolution be null.
10. For each ExportEntry Record e in module.[[StarExportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
e.[[ModuleRequest]]).
b. Let resolution be ? importedModule.ResolveExport(exportName,
resolveSet, exportStarSet).
c. If resolution is "ambiguous", return "ambiguous".
d. If resolution is not null, then
i. If starResolution is null, let starResolution be resolution.
ii. Else,
1. Assert: there is more than one * import that includes the
requested name.
2. If resolution.[[Module]] and starResolution.[[Module]] are
not the same Module Record or
SameValue(resolution.[[BindingName]],
starResolution.[[BindingName]]) is false, return "ambiguous".
---*/
with ({}) {
import('./instn-iee-err-ambiguous-export_FIXTURE.js').catch(error => {
assert.sameValue(error.name, 'SyntaxError');
}).then($DONE, $DONE);
}

View File

@ -1,49 +0,0 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/instn-iee-err-circular.case
// - src/dynamic-import/catch/nested-with.template
/*---
description: IndirectExportEntries validation - circular imported bindings (nested with)
esid: sec-import-call-runtime-semantics-evaluation
features: [dynamic-import]
flags: [generated, async, noStrict]
info: |
ImportCall :
import( AssignmentExpression )
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
3. Let argRef be the result of evaluating AssignmentExpression.
4. Let specifier be ? GetValue(argRef).
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
6. Let specifierString be ToString(specifier).
7. IfAbruptRejectPromise(specifierString, promiseCapability).
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
9. Return promiseCapability.[[Promise]].
[...]
9. For each ExportEntry Record e in module.[[IndirectExportEntries]], do
a. Let resolution be ? module.ResolveExport(e.[[ExportName]], « », « »).
b. If resolution is null or resolution is "ambiguous", throw a
SyntaxError exception.
[...]
15.2.1.16.3 ResolveExport
[...]
2. For each Record {[[Module]], [[ExportName]]} r in resolveSet, do:
a. If module and r.[[Module]] are the same Module Record and
SameValue(exportName, r.[[ExportName]]) is true, then
i. Assert: this is a circular import request.
ii. Return null.
---*/
with ({}) {
import('./instn-iee-err-circular-1_FIXTURE.js').catch(error => {
assert.sameValue(error.name, 'SyntaxError');
}).then($DONE, $DONE);
}