fix fixtures folders and nit picking on tests

This commit is contained in:
Leo Balter 2018-10-03 17:52:36 -04:00 committed by Rick Waldron
parent 0a18f4068b
commit 7347b2a121
9 changed files with 14 additions and 89 deletions

View File

@ -1,4 +0,0 @@
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
throw new TypeError();

View File

@ -1,23 +0,0 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: >
Abrupt completion during module evaluation precludes further evaluation
esid: sec-moduleevaluation
info: |
[...]
6. For each String required that is an element of
module.[[RequestedModules]] do,
a. Let requiredModule be ? HostResolveImportedModule(module, required).
b. Perform ? requiredModule.ModuleEvaluation().
flags: [async, module]
features: [dynamic-import]
---*/
import('./eval-rqstd-abrupt-err-type_FIXTURE.js').then($DONE, error => {
// negative:
// phase: runtime
// type: TypeError
assert.sameValue(error instanceof TypeError, true);
}).then($DONE, $DONE).catch($DONE);

View File

@ -1,5 +1,6 @@
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Requested modules are evaluated exactly once
esid: sec-moduleevaluation
@ -12,20 +13,19 @@ info: |
b. Perform ? requiredModule.ModuleEvaluation().
[...]
includes: [fnGlobalObject.js]
flags: [async, module]
flags: [async]
features: [dynamic-import]
---*/
var global = fnGlobalObject();
Promise.all([
import('./eval-rqstd-once_FIXTURE.js'),
import('./eval-rqstd-once_FIXTURE.js'),
import('./eval-rqstd-once_FIXTURE.js'),
]).then((...importeds) => {
]).then(async () => {
// Use await to serialize imports
await import('./eval-rqstd-once_FIXTURE.js');
await import('./eval-rqstd-once_FIXTURE.js');
assert.sameValue(global.test262, 262, 'global property was defined');
}).then($DONE, $DONE);

View File

@ -1,4 +1,4 @@
// Copyright (C) 2018 the V8 project authors. All rights reserved.
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Module is evaluated exactly once
@ -12,7 +12,7 @@ info: |
b. Perform ? requiredModule.ModuleEvaluation().
[...]
includes: [fnGlobalObject.js]
flags: [async,module]
flags: [async]
features: [dynamic-import]
---*/
@ -27,6 +27,10 @@ global.evaluated++;
Promise.all([
import('./eval-self-once.js'),
import('./eval-self-once.js'),
]).then((...importeds) => {
]).then(async () => {
// Use await to serialize imports
await import('./eval-self-once.js');
await import('./eval-self-once.js');
assert.sameValue(global.evaluated, 1, 'global property was defined and incremented only once');
}).then($DONE, $DONE);

View File

@ -1,4 +0,0 @@
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
export var x;

View File

@ -1,4 +0,0 @@
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
export var x;

View File

@ -1,39 +0,0 @@
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: IndirectExportEntries validation - ambiguous imported bindings
esid: sec-moduledeclarationinstantiation
info: |
[...]
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".
negative:
phase: runtime
type: SyntaxError
flags: [module]
---*/
export { x } from './instn-iee-err-ambiguous_FIXTURE.js';

View File

@ -1,5 +0,0 @@
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
export * from './instn-iee-err-ambiguous-1_FIXTURE.js';
export * from './instn-iee-err-ambiguous-2_FIXTURE.js';