Copy all import assertions tests as a basis for import attributes tests

This commit is contained in:
Nicolò Ribaudo 2023-09-13 13:46:05 +02:00 committed by Philip Chimento
parent 892a5dccd2
commit 06f6ae960a
108 changed files with 2898 additions and 0 deletions

View File

@ -0,0 +1,14 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: ImportCall trailing comma following first parameter
template: syntax/valid
info: |
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
features: [import-assertions]
---*/
//- import
import('./empty_FIXTURE.js',)

View File

@ -0,0 +1,14 @@
// Copyright (C) 2021 V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: ImportCall trailing comma following second parameter
template: syntax/valid
info: |
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
features: [import-assertions]
---*/
//- import
import('./empty_FIXTURE.js', {},)

View File

@ -0,0 +1,21 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: >
ImportCall parameter list forwards the Await production parameter - AwaitExpression
esid: sec-import-call-runtime-semantics-evaluation
info: |
ImportCall[Yield, Await]:
import ( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import ( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
features: [dynamic-import, import-assertions, async-functions]
flags: [async]
---*/
(async function () {
return import('./2nd-param_FIXTURE.js', await undefined);
}())
.then(function(module) {
assert.sameValue(module.default, 262);
})
.then($DONE, $DONE);

View File

@ -0,0 +1,21 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: >
ImportCall parameter list forwards the Await production parameter - IdentifierReference
esid: sec-import-call-runtime-semantics-evaluation
info: |
ImportCall[Yield, Await]:
import ( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import ( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
features: [dynamic-import, import-assertions, async-functions]
flags: [async]
---*/
function await() {}
import('./2nd-param_FIXTURE.js', await(undefined))
.then(function(module) {
assert.sameValue(module.default, 262);
})
.then($DONE, $DONE);

View File

@ -0,0 +1,30 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Forwards "return" completion when evaluating second parameter
esid: sec-import-call-runtime-semantics-evaluation
info: |
2.1.1.1 EvaluateImportCall ( specifierExpression [ , optionsExpression ] )
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
2. Let specifierRef be the result of evaluating specifierExpression.
3. Let specifier be ? GetValue(specifierRef).
4. If optionsExpression is present, then
a. Let optionsRef be the result of evaluating optionsExpression.
b. Let options be ? GetValue(optionsRef).
[...]
features: [dynamic-import, import-assertions]
---*/
var beforeCount = 0;
var afterCount = 0;
var iter = function*() {
beforeCount += 1, import('', yield), afterCount += 1;
}();
iter.next();
var result = iter.return(595);
assert.sameValue(result.done, true);
assert.sameValue(result.value, 595);
assert.sameValue(beforeCount, 1);
assert.sameValue(afterCount, 0);

View File

@ -0,0 +1,29 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Forwards "throw" completion when evaluating second parameter
esid: sec-import-call-runtime-semantics-evaluation
info: |
2.1.1.1 EvaluateImportCall ( specifierExpression [ , optionsExpression ] )
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
2. Let specifierRef be the result of evaluating specifierExpression.
3. Let specifier be ? GetValue(specifierRef).
4. If optionsExpression is present, then
a. Let optionsRef be the result of evaluating optionsExpression.
b. Let options be ? GetValue(optionsRef).
[...]
features: [dynamic-import, import-assertions]
---*/
var beforeCount = 0;
var afterCount = 0;
function throwError() {
throw new Test262Error();
}
assert.throws(Test262Error, function() {
beforeCount += 1, import('', throwError()), afterCount += 1;
});
assert.sameValue(beforeCount, 1);
assert.sameValue(afterCount, 0);

View File

@ -0,0 +1,25 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Evaluates parameters in correct sequence
esid: sec-import-call-runtime-semantics-evaluation
info: |
2.1.1.1 EvaluateImportCall ( specifierExpression [ , optionsExpression ] )
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
2. Let specifierRef be the result of evaluating specifierExpression.
3. Let specifier be ? GetValue(specifierRef).
4. If optionsExpression is present, then
a. Let optionsRef be the result of evaluating optionsExpression.
b. Let options be ? GetValue(optionsRef).
[...]
features: [dynamic-import, import-assertions]
---*/
var log = [];
import(log.push('first'), (log.push('second'), undefined))
.then(null, function() {});
assert.sameValue(log.length, 2);
assert.sameValue(log[0], 'first');
assert.sameValue(log[1], 'second');

View File

@ -0,0 +1,36 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Rejects promise when accessing "assert" property throws an error
esid: sec-import-call-runtime-semantics-evaluation
info: |
2.1.1.1 EvaluateImportCall ( specifierExpression [ , optionsExpression ] )
[...]
6. Let promiseCapability be ! NewPromiseCapability(%Promise%).
7. Let specifierString be ToString(specifier).
8. IfAbruptRejectPromise(specifierString, promiseCapability).
9. Let assertions be a new empty List.
10. If options is not undefined, then
a. If Type(options) is not Object,
[...]
b. Let assertionsObj be Get(options, "assert").
c. IfAbruptRejectPromise(assertionsObj, promiseCapability).
[...]
features: [dynamic-import, import-assertions]
flags: [async]
---*/
var thrown = new Test262Error();
var options = {
get assert() {
throw thrown;
}
};
import('./2nd-param_FIXTURE.js', options)
.then(function() {
throw new Test262Error('Expected an error, but observed no error');
}, function(caught) {
assert.sameValue(thrown, caught);
})
.then($DONE, $DONE);

View File

@ -0,0 +1,22 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: ImportCall parameter list enables the Yield production parameter
esid: sec-import-call-runtime-semantics-evaluation
info: |
ImportCall[Yield, Await]:
import ( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import ( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
features: [dynamic-import, import-assertions]
flags: [async]
---*/
var promise;
for (promise = import('./2nd-param_FIXTURE.js', 'test262' in {} || undefined); false; ) ;
promise
.then(function(module) {
assert.sameValue(module.default, 262);
})
.then($DONE, $DONE);

View File

@ -0,0 +1,40 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: >
Rejects promise when the second argument is neither undefined nor an object
esid: sec-import-call-runtime-semantics-evaluation
info: |
2.1.1.1 EvaluateImportCall ( specifierExpression [ , optionsExpression ] )
[...]
6. Let promiseCapability be ! NewPromiseCapability(%Promise%).
7. Let specifierString be ToString(specifier).
8. IfAbruptRejectPromise(specifierString, promiseCapability).
9. Let assertions be a new empty List.
10. If options is not undefined, then
a. If Type(options) is not Object,
i. Perform ! Call(promiseCapability.[[Reject]], undefined, « a newly created TypeError object »).
ii. Return promiseCapability.[[Promise]].
[...]
features: [dynamic-import, import-assertions, Symbol, BigInt]
flags: [async]
---*/
function test(promise, valueType) {
return promise.then(function() {
throw new Test262Error('Promise for ' + valueType + ' was not rejected.');
}, function(error) {
assert.sameValue(error.constructor, TypeError, valueType);
});
}
Promise.all([
test(import('./2nd-param_FIXTURE.js', null), 'null'),
test(import('./2nd-param_FIXTURE.js', false), 'boolean'),
test(import('./2nd-param_FIXTURE.js', 23), 'number'),
test(import('./2nd-param_FIXTURE.js', ''), 'string'),
test(import('./2nd-param_FIXTURE.js', Symbol('')), 'symbol'),
test(import('./2nd-param_FIXTURE.js', 23n), 'bigint')
])
.then(function() {})
.then($DONE, $DONE);

View File

@ -0,0 +1,20 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: >
ImportCall parameter list supports an optional trailing comma (fulfillment
semantics)
esid: sec-import-call-runtime-semantics-evaluation
info: |
ImportCall[Yield, Await]:
import ( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import ( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
features: [dynamic-import, import-assertions]
flags: [async]
---*/
import('./2nd-param_FIXTURE.js', {},)
.then(function(module) {
assert.sameValue(module.default, 262);
})
.then($DONE, $DONE);

View File

@ -0,0 +1,24 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: >
ImportCall parameter list supports an optional trailing comma (rejection
semantics)
esid: sec-import-call-runtime-semantics-evaluation
info: |
ImportCall[Yield, Await]:
import ( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import ( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
features: [dynamic-import, import-assertions]
flags: [async]
---*/
var thrown = new Test262Error();
import({toString: function() { throw thrown; } }, {},)
.then(function() {
throw new Test262Error('Expected promise to be rejected, but it was fulfilled.');
}, function(caught) {
assert.sameValue(thrown, caught);
})
.then($DONE, $DONE);

View File

@ -0,0 +1,43 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Reports abrupt completions produced by attributes enumeration
esid: sec-import-call-runtime-semantics-evaluation
info: |
2.1.1.1 EvaluateImportCall ( specifierExpression [ , optionsExpression ] )
[...]
6. Let promiseCapability be ! NewPromiseCapability(%Promise%).
7. Let specifierString be ToString(specifier).
8. IfAbruptRejectPromise(specifierString, promiseCapability).
9. Let assertions be a new empty List.
10. If options is not undefined, then
a. If Type(options) is not Object,
[...]
b. Let assertionsObj be Get(options, "assert").
c. IfAbruptRejectPromise(assertionsObj, promiseCapability).
d. If assertionsObj is not undefined,
i. If Type(assertionsObj) is not Object,
[...]
ii. Let keys be EnumerableOwnPropertyNames(assertionsObj, key).
iii. IfAbruptRejectPromise(keys, promiseCapability).
[...]
features: [dynamic-import, import-assertions, Proxy]
flags: [async]
---*/
var thrown = new Test262Error();
var options = {
assert: new Proxy({}, {
ownKeys: function() {
throw thrown;
},
})
};
import('./2nd-param_FIXTURE.js', options)
.then(function() {
throw new Test262Error('Expected promise to be rejected, but promise was fulfilled.');
}, function(error) {
assert.sameValue(error, thrown);
})
.then($DONE, $DONE);

View File

@ -0,0 +1,60 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: >
Follows the semantics of the EnumerableOwnPropertyNames abstract operation
during attributes enumeration
esid: sec-import-call-runtime-semantics-evaluation
info: |
2.1.1.1 EvaluateImportCall ( specifierExpression [ , optionsExpression ] )
[...]
6. Let promiseCapability be ! NewPromiseCapability(%Promise%).
7. Let specifierString be ToString(specifier).
8. IfAbruptRejectPromise(specifierString, promiseCapability).
9. Let assertions be a new empty List.
10. If options is not undefined, then
a. If Type(options) is not Object,
[...]
b. Let assertionsObj be Get(options, "assert").
c. IfAbruptRejectPromise(assertionsObj, promiseCapability).
d. If assertionsObj is not undefined,
i. If Type(assertionsObj) is not Object,
[...]
ii. Let keys be EnumerableOwnPropertyNames(assertionsObj, key).
[...]
features: [dynamic-import, import-assertions, json-modules, Symbol, Proxy]
flags: [async]
---*/
var symbol = Symbol('');
var target = {
type: "json"
};
var descriptors = {
type: {configurable: true, enumerable: true}
};
var log = [];
var options = {
assert: new Proxy({}, {
ownKeys: function() {
return ["type"];
},
get(_, name) {
log.push(name);
return "json";
},
getOwnPropertyDescriptor(target, name) {
return {configurable: true, enumerable: true, value: "json"};
},
})
};
import('./2nd-param_FIXTURE.json', options)
.then(function(module) {
assert.sameValue(module.default, 262);
})
.then($DONE, $DONE);
assert.sameValue(log.length, 1);
assert.sameValue(log[0], "type")

View File

@ -0,0 +1,58 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: >
Follows the semantics of the EnumerableOwnPropertyNames abstract operation
during attributes enumeration
esid: sec-import-call-runtime-semantics-evaluation
info: |
2.1.1.1 EvaluateImportCall ( specifierExpression [ , optionsExpression ] )
[...]
6. Let promiseCapability be ! NewPromiseCapability(%Promise%).
7. Let specifierString be ToString(specifier).
8. IfAbruptRejectPromise(specifierString, promiseCapability).
9. Let assertions be a new empty List.
10. If options is not undefined, then
a. If Type(options) is not Object,
[...]
b. Let assertionsObj be Get(options, "assert").
c. IfAbruptRejectPromise(assertionsObj, promiseCapability).
d. If assertionsObj is not undefined,
i. If Type(assertionsObj) is not Object,
[...]
ii. Let keys be EnumerableOwnPropertyNames(assertionsObj, key).
[...]
features: [dynamic-import, import-assertions, Symbol, Proxy]
flags: [async]
---*/
var symbol = Symbol('');
var target = {
[symbol]: '',
unreported: '',
nonEnumerable: ''
};
var descriptors = {
[symbol]: {configurable: true, enumerable: true},
nonEnumerable: {configurable: true, enumerable: false}
};
var options = {
assert: new Proxy({}, {
ownKeys: function() {
return [symbol, 'nonEnumerable', 'absent'];
},
get() {
throw new Error("Should not be called");
},
getOwnPropertyDescriptor(target, name) {
return descriptors[name];
}
})
};
import('./2nd-param_FIXTURE.js', options)
.then(function(module) {
assert.sameValue(module.default, 262);
})
.then($DONE, $DONE);

View File

@ -0,0 +1,47 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: >
Rejects promise when the `assert` property of the second argument is neither
undefined nor an object
esid: sec-import-call-runtime-semantics-evaluation
info: |
2.1.1.1 EvaluateImportCall ( specifierExpression [ , optionsExpression ] )
[...]
6. Let promiseCapability be ! NewPromiseCapability(%Promise%).
7. Let specifierString be ToString(specifier).
8. IfAbruptRejectPromise(specifierString, promiseCapability).
9. Let assertions be a new empty List.
10. If options is not undefined, then
a. If Type(options) is not Object,
[...]
b. Let assertionsObj be Get(options, "assert").
c. IfAbruptRejectPromise(assertionsObj, promiseCapability).
d. If assertionsObj is not undefined,
i. If Type(assertionsObj) is not Object,
1. Perform ! Call(promiseCapability.[[Reject]], undefined, « a
newly created TypeError object »).
2. Return promiseCapability.[[Promise]].
[...]
features: [dynamic-import, import-assertions, Symbol, BigInt]
flags: [async]
---*/
function test(promise, valueType) {
return promise.then(function() {
throw new Test262Error('Promise for ' + valueType + ' was not rejected.');
}, function(error) {
assert.sameValue(error.constructor, TypeError, valueType);
});
}
Promise.all([
test(import('./2nd-param_FIXTURE.js', {assert:null}), 'null'),
test(import('./2nd-param_FIXTURE.js', {assert:false}), 'boolean'),
test(import('./2nd-param_FIXTURE.js', {assert:23}), 'number'),
test(import('./2nd-param_FIXTURE.js', {assert:''}), 'string'),
test(import('./2nd-param_FIXTURE.js', {assert:Symbol('')}), 'symbol'),
test(import('./2nd-param_FIXTURE.js', {assert:23n}), 'bigint')
])
.then(function() {})
.then($DONE, $DONE);

View File

@ -0,0 +1,36 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Accepts undefined for the `assert` property of the second argument
esid: sec-import-call-runtime-semantics-evaluation
info: |
2.1.1.1 EvaluateImportCall ( specifierExpression [ , optionsExpression ] )
[...]
6. Let promiseCapability be ! NewPromiseCapability(%Promise%).
7. Let specifierString be ToString(specifier).
8. IfAbruptRejectPromise(specifierString, promiseCapability).
9. Let assertions be a new empty List.
10. If options is not undefined, then
a. If Type(options) is not Object,
[...]
b. Let assertionsObj be Get(options, "assert").
c. IfAbruptRejectPromise(assertionsObj, promiseCapability).
d. If assertionsObj is not undefined,
i. If Type(assertionsObj) is not Object,
1. Perform ! Call(promiseCapability.[[Reject]], undefined, « a
newly created TypeError object »).
2. Return promiseCapability.[[Promise]].
[...]
features: [dynamic-import, import-assertions, Symbol, BigInt]
flags: [async]
---*/
Promise.all([
import('./2nd-param_FIXTURE.js', {}),
import('./2nd-param_FIXTURE.js', {assert:undefined}),
])
.then(function(values) {
assert.sameValue(values[0].default, 262);
assert.sameValue(values[1].default, 262);
})
.then($DONE, $DONE);

View File

@ -0,0 +1,34 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: >
Rejects promise when retrieving a value of the `assert` object produces an
abrupt completion
esid: sec-import-call-runtime-semantics-evaluation
info: |
2.1.1.1 EvaluateImportCall ( specifierExpression [ , optionsExpression ] )
[...]
10. If options is not undefined, then
[...]
d. If assertionsObj is not undefined,
[...]
ii. Let keys be EnumerableOwnPropertyNames(assertionsObj, key).
iii. IfAbruptRejectPromise(keys, promiseCapability).
iv. Let supportedAssertions be ! HostGetSupportedImportAssertions().
v. For each String key of keys,
1. Let value be Get(assertionsObj, key).
2. IfAbruptRejectPromise(value, promiseCapability).
[...]
features: [dynamic-import, import-assertions]
flags: [async]
---*/
var thrown = new Test262Error();
import('./2nd-param_FIXTURE.js', {assert:{get ''() { throw thrown; }}})
.then(function() {
throw new Test262Error('Expected promise to be rejected, but it was fulfilled');
}, function(error) {
assert.sameValue(error, thrown);
})
.then($DONE, $DONE);

View File

@ -0,0 +1,47 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: >
Rejects promise when any property of the `assert` object is not a string
esid: sec-import-call-runtime-semantics-evaluation
info: |
2.1.1.1 EvaluateImportCall ( specifierExpression [ , optionsExpression ] )
[...]
10. If options is not undefined, then
[...]
d. If assertionsObj is not undefined,
[...]
ii. Let keys be EnumerableOwnPropertyNames(assertionsObj, key).
iii. IfAbruptRejectPromise(keys, promiseCapability).
iv. Let supportedAssertions be ! HostGetSupportedImportAssertions().
v. For each String key of keys,
1. Let value be Get(assertionsObj, key).
2. IfAbruptRejectPromise(value, promiseCapability).
3. If Type(value) is not String, then
a. Perform ! Call(promiseCapability.[[Reject]], undefined, « a
newly created TypeError object »).
b. Return promiseCapability.[[Promise]].
[...]
features: [dynamic-import, import-assertions, Symbol, BigInt]
flags: [async]
---*/
function test(promise, valueType) {
return promise.then(function() {
throw new Test262Error('Promise for ' + valueType + ' was not rejected.');
}, function(error) {
assert.sameValue(error.constructor, TypeError, valueType);
});
}
Promise.all([
test(import('./2nd-param_FIXTURE.js', {assert:{'': undefined}}), 'undefined'),
test(import('./2nd-param_FIXTURE.js', {assert:{'': null}}), 'null'),
test(import('./2nd-param_FIXTURE.js', {assert:{'': false}}), 'boolean'),
test(import('./2nd-param_FIXTURE.js', {assert:{'': 23}}), 'number'),
test(import('./2nd-param_FIXTURE.js', {assert:{'': Symbol('')}}), 'symbol'),
test(import('./2nd-param_FIXTURE.js', {assert:{'': 23n}}), 'bigint'),
test(import('./2nd-param_FIXTURE.js', {assert:{'': {}}}), 'object')
])
.then(function() {})
.then($DONE, $DONE);

View File

@ -0,0 +1,31 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: >
ImportCall parameter list forwards the Yield production parameter - YieldExpression
esid: sec-import-call-runtime-semantics-evaluation
info: |
ImportCall[Yield, Await]:
import ( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import ( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
features: [dynamic-import, import-assertions]
flags: [async]
---*/
var promise;
var iter = (function * () {
promise = import('./2nd-param_FIXTURE.js', yield);
}());
iter.next();
assert.sameValue(promise, undefined);
iter.next();
promise
.then(function(module) {
assert.sameValue(module.default, 262);
})
.then($DONE, $DONE);

View File

@ -0,0 +1,19 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: >
ImportCall parameter list forwards the Yield production parameter - invalid IdentifierReference
esid: sec-import-call-runtime-semantics-evaluation
info: |
ImportCall[Yield, Await]:
import ( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import ( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
features: [dynamic-import, import-assertions]
flags: [onlyStrict]
negative:
phase: parse
type: SyntaxError
---*/
$DONOTEVALUATE();
import('./empty_FIXTURE.js', yield);

View File

@ -0,0 +1,21 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: >
ImportCall parameter list forwards the Yield production parameter - valid IdentifierReference
esid: sec-import-call-runtime-semantics-evaluation
info: |
ImportCall[Yield, Await]:
import ( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import ( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
features: [dynamic-import, import-assertions]
flags: [async, noStrict]
---*/
var yield;
import('./2nd-param_FIXTURE.js', yield)
.then(function(module) {
assert.sameValue(module.default, 262);
})
.then($DONE, $DONE);

View File

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

View File

@ -0,0 +1,20 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: >
ImportCall parameter list supports an optional trailing comma (fulfillment
semantics)
esid: sec-import-call-runtime-semantics-evaluation
info: |
ImportCall[Yield, Await]:
import ( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import ( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
features: [dynamic-import, import-assertions]
flags: [async]
---*/
import('./2nd-param_FIXTURE.js',)
.then(function(module) {
assert.sameValue(module.default, 262);
})
.then($DONE, $DONE);

View File

@ -0,0 +1,24 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: >
ImportCall parameter list supports an optional trailing comma (rejection
semantics)
esid: sec-import-call-runtime-semantics-evaluation
info: |
ImportCall[Yield, Await]:
import ( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import ( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
features: [dynamic-import, import-assertions]
flags: [async]
---*/
var thrown = new Test262Error();
import({toString: function() { throw thrown; } },)
.then(function() {
throw new Test262Error('Expected promise to be rejected, but it was fulfilled.');
}, function(caught) {
assert.sameValue(thrown, caught);
})
.then($DONE, $DONE);

View File

@ -0,0 +1,30 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-first.case
// - src/dynamic-import/syntax/valid/nested-arrow-assignment-expression.template
/*---
description: ImportCall trailing comma following first parameter (nested arrow syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
let f = () => import('./empty_FIXTURE.js',);

View File

@ -0,0 +1,30 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-second.case
// - src/dynamic-import/syntax/valid/nested-arrow-assignment-expression.template
/*---
description: ImportCall trailing comma following second parameter (nested arrow syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
let f = () => import('./empty_FIXTURE.js', {},);

View File

@ -0,0 +1,32 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-first.case
// - src/dynamic-import/syntax/valid/nested-arrow.template
/*---
description: ImportCall trailing comma following first parameter (nested arrow syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
let f = () => {
import('./empty_FIXTURE.js',);
};

View File

@ -0,0 +1,32 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-second.case
// - src/dynamic-import/syntax/valid/nested-arrow.template
/*---
description: ImportCall trailing comma following second parameter (nested arrow syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
let f = () => {
import('./empty_FIXTURE.js', {},);
};

View File

@ -0,0 +1,32 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-first.case
// - src/dynamic-import/syntax/valid/nested-async-arrow-fn-await.template
/*---
description: ImportCall trailing comma following first parameter (nested in async arrow function)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
(async () => {
await import('./empty_FIXTURE.js',)
});

View File

@ -0,0 +1,32 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-second.case
// - src/dynamic-import/syntax/valid/nested-async-arrow-fn-await.template
/*---
description: ImportCall trailing comma following second parameter (nested in async arrow function)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
(async () => {
await import('./empty_FIXTURE.js', {},)
});

View File

@ -0,0 +1,30 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-first.case
// - src/dynamic-import/syntax/valid/nested-async-arrow-fn-return-await.template
/*---
description: ImportCall trailing comma following first parameter (nested in async arrow function, returned)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
(async () => await import('./empty_FIXTURE.js',));

View File

@ -0,0 +1,30 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-second.case
// - src/dynamic-import/syntax/valid/nested-async-arrow-fn-return-await.template
/*---
description: ImportCall trailing comma following second parameter (nested in async arrow function, returned)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
(async () => await import('./empty_FIXTURE.js', {},));

View File

@ -0,0 +1,32 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-first.case
// - src/dynamic-import/syntax/valid/nested-async-function-await.template
/*---
description: ImportCall trailing comma following first parameter (nested arrow syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
async function f() {
await import('./empty_FIXTURE.js',);
}

View File

@ -0,0 +1,32 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-second.case
// - src/dynamic-import/syntax/valid/nested-async-function-await.template
/*---
description: ImportCall trailing comma following second parameter (nested arrow syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
async function f() {
await import('./empty_FIXTURE.js', {},);
}

View File

@ -0,0 +1,33 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-first.case
// - src/dynamic-import/syntax/valid/nested-async-function.template
/*---
description: ImportCall trailing comma following first parameter (nested arrow syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
async function f() {
import('./empty_FIXTURE.js',);
}

View File

@ -0,0 +1,33 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-second.case
// - src/dynamic-import/syntax/valid/nested-async-function.template
/*---
description: ImportCall trailing comma following second parameter (nested arrow syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
async function f() {
import('./empty_FIXTURE.js', {},);
}

View File

@ -0,0 +1,33 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-first.case
// - src/dynamic-import/syntax/valid/nested-async-function-return-await.template
/*---
description: ImportCall trailing comma following first parameter (nested arrow syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
async function f() {
return await import('./empty_FIXTURE.js',);
}

View File

@ -0,0 +1,33 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-second.case
// - src/dynamic-import/syntax/valid/nested-async-function-return-await.template
/*---
description: ImportCall trailing comma following second parameter (nested arrow syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
async function f() {
return await import('./empty_FIXTURE.js', {},);
}

View File

@ -0,0 +1,32 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-first.case
// - src/dynamic-import/syntax/valid/nested-async-generator-await.template
/*---
description: ImportCall trailing comma following first parameter (nested in async generator, awaited)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import, async-iteration]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
async function * f() {
await import('./empty_FIXTURE.js',)
}

View File

@ -0,0 +1,32 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-second.case
// - src/dynamic-import/syntax/valid/nested-async-generator-await.template
/*---
description: ImportCall trailing comma following second parameter (nested in async generator, awaited)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import, async-iteration]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
async function * f() {
await import('./empty_FIXTURE.js', {},)
}

View File

@ -0,0 +1,32 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-first.case
// - src/dynamic-import/syntax/valid/nested-block.template
/*---
description: ImportCall trailing comma following first parameter (nested block syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
{
import('./empty_FIXTURE.js',);
};

View File

@ -0,0 +1,32 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-second.case
// - src/dynamic-import/syntax/valid/nested-block.template
/*---
description: ImportCall trailing comma following second parameter (nested block syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
{
import('./empty_FIXTURE.js', {},);
};

View File

@ -0,0 +1,32 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-first.case
// - src/dynamic-import/syntax/valid/nested-block-labeled.template
/*---
description: ImportCall trailing comma following first parameter (nested block syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
label: {
import('./empty_FIXTURE.js',);
};

View File

@ -0,0 +1,32 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-second.case
// - src/dynamic-import/syntax/valid/nested-block-labeled.template
/*---
description: ImportCall trailing comma following second parameter (nested block syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
label: {
import('./empty_FIXTURE.js', {},);
};

View File

@ -0,0 +1,32 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-first.case
// - src/dynamic-import/syntax/valid/nested-do-while.template
/*---
description: ImportCall trailing comma following first parameter (nested do while syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
do {
import('./empty_FIXTURE.js',);
} while (false);

View File

@ -0,0 +1,32 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-second.case
// - src/dynamic-import/syntax/valid/nested-do-while.template
/*---
description: ImportCall trailing comma following second parameter (nested do while syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
do {
import('./empty_FIXTURE.js', {},);
} while (false);

View File

@ -0,0 +1,32 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-first.case
// - src/dynamic-import/syntax/valid/nested-else-braceless.template
/*---
description: ImportCall trailing comma following first parameter (nested else syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
if (false) {
} else import('./empty_FIXTURE.js',);

View File

@ -0,0 +1,32 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-second.case
// - src/dynamic-import/syntax/valid/nested-else-braceless.template
/*---
description: ImportCall trailing comma following second parameter (nested else syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
if (false) {
} else import('./empty_FIXTURE.js', {},);

View File

@ -0,0 +1,34 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-first.case
// - src/dynamic-import/syntax/valid/nested-else.template
/*---
description: ImportCall trailing comma following first parameter (nested else syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
if (false) {
} else {
import('./empty_FIXTURE.js',);
}

View File

@ -0,0 +1,34 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-second.case
// - src/dynamic-import/syntax/valid/nested-else.template
/*---
description: ImportCall trailing comma following second parameter (nested else syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
if (false) {
} else {
import('./empty_FIXTURE.js', {},);
}

View File

@ -0,0 +1,32 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-first.case
// - src/dynamic-import/syntax/valid/nested-function.template
/*---
description: ImportCall trailing comma following first parameter (nested function syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
function fn() {
import('./empty_FIXTURE.js',);
}

View File

@ -0,0 +1,32 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-second.case
// - src/dynamic-import/syntax/valid/nested-function.template
/*---
description: ImportCall trailing comma following second parameter (nested function syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
function fn() {
import('./empty_FIXTURE.js', {},);
}

View File

@ -0,0 +1,32 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-first.case
// - src/dynamic-import/syntax/valid/nested-function-return.template
/*---
description: ImportCall trailing comma following first parameter (nested function syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
function fn() {
return import('./empty_FIXTURE.js',);
}

View File

@ -0,0 +1,32 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-second.case
// - src/dynamic-import/syntax/valid/nested-function-return.template
/*---
description: ImportCall trailing comma following second parameter (nested function syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
function fn() {
return import('./empty_FIXTURE.js', {},);
}

View File

@ -0,0 +1,30 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-first.case
// - src/dynamic-import/syntax/valid/nested-if-braceless.template
/*---
description: ImportCall trailing comma following first parameter (nested if syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
if (true) import('./empty_FIXTURE.js',);

View File

@ -0,0 +1,30 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-second.case
// - src/dynamic-import/syntax/valid/nested-if-braceless.template
/*---
description: ImportCall trailing comma following second parameter (nested if syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
if (true) import('./empty_FIXTURE.js', {},);

View File

@ -0,0 +1,32 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-first.case
// - src/dynamic-import/syntax/valid/nested-if.template
/*---
description: ImportCall trailing comma following first parameter (nested if syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
if (true) {
import('./empty_FIXTURE.js',);
}

View File

@ -0,0 +1,32 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-second.case
// - src/dynamic-import/syntax/valid/nested-if.template
/*---
description: ImportCall trailing comma following second parameter (nested if syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
if (true) {
import('./empty_FIXTURE.js', {},);
}

View File

@ -0,0 +1,34 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-first.case
// - src/dynamic-import/syntax/valid/nested-while.template
/*---
description: ImportCall trailing comma following first parameter (nested while syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
let x = 0;
while (!x) {
x++;
import('./empty_FIXTURE.js',);
};

View File

@ -0,0 +1,34 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-second.case
// - src/dynamic-import/syntax/valid/nested-while.template
/*---
description: ImportCall trailing comma following second parameter (nested while syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
let x = 0;
while (!x) {
x++;
import('./empty_FIXTURE.js', {},);
};

View File

@ -0,0 +1,33 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-first.case
// - src/dynamic-import/syntax/valid/nested-with-expression.template
/*---
description: ImportCall trailing comma following first parameter (nested with syntax in the expression position)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated, 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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
with (import('./empty_FIXTURE.js',)) {
assert.sameValue(then, Promise.prototype.then);
assert.sameValue(constructor, Promise);
}

View File

@ -0,0 +1,33 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-second.case
// - src/dynamic-import/syntax/valid/nested-with-expression.template
/*---
description: ImportCall trailing comma following second parameter (nested with syntax in the expression position)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated, 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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
with (import('./empty_FIXTURE.js', {},)) {
assert.sameValue(then, Promise.prototype.then);
assert.sameValue(constructor, Promise);
}

View File

@ -0,0 +1,32 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-first.case
// - src/dynamic-import/syntax/valid/nested-with.template
/*---
description: ImportCall trailing comma following first parameter (nested with syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated, 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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
with ({}) {
import('./empty_FIXTURE.js',);
}

View File

@ -0,0 +1,32 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-second.case
// - src/dynamic-import/syntax/valid/nested-with.template
/*---
description: ImportCall trailing comma following second parameter (nested with syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated, 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]].
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
with ({}) {
import('./empty_FIXTURE.js', {},);
}

View File

@ -0,0 +1,20 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-first.case
// - src/dynamic-import/syntax/valid/top-level.template
/*---
description: ImportCall trailing comma following first parameter (top level syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
info: |
ImportCall :
import( AssignmentExpression )
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
import('./empty_FIXTURE.js',);

View File

@ -0,0 +1,20 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/import-attributes-trailing-comma-second.case
// - src/dynamic-import/syntax/valid/top-level.template
/*---
description: ImportCall trailing comma following second parameter (top level syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [import-assertions, dynamic-import]
flags: [generated]
info: |
ImportCall :
import( AssignmentExpression )
ImportCall :
import( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
import( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
---*/
import('./empty_FIXTURE.js', {},);

View File

@ -0,0 +1,20 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-parse-json-module
description: Creates extensible arrays
flags: [module]
includes: [propertyHelper.js]
features: [import-assertions, json-modules]
---*/
import value from './json-value-array_FIXTURE.json' assert { type: 'json' };
value.test262property = 'test262 value';
verifyProperty(value, 'test262property', {
value: 'test262 value',
writable: true,
enumerable: true,
configurable: true
});

View File

@ -0,0 +1,20 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-parse-json-module
description: Creates extensible objects
flags: [module]
includes: [propertyHelper.js]
features: [import-assertions, json-modules]
---*/
import value from './json-value-object_FIXTURE.json' assert { type: 'json' };
value.test262property = 'test262 value';
verifyProperty(value, 'test262property', {
value: 'test262 value',
writable: true,
enumerable: true,
configurable: true
});

View File

@ -0,0 +1,6 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
import value from './json-idempotency_FIXTURE.json' assert { type: 'json' };
globalThis.viaSecondModule = value;

View File

@ -0,0 +1,21 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-parse-json-module
description: The same object representation is returned to all import sites
flags: [module, async]
features: [import-assertions, json-modules, globalThis, dynamic-import]
---*/
import viaStaticImport1 from './json-idempotency_FIXTURE.json' assert { type: 'json' };
import {default as viaStaticImport2} from './json-idempotency_FIXTURE.json' assert { type: 'json' };
import './json-idempotency-indirect_FIXTURE.js';
assert.sameValue(viaStaticImport1, viaStaticImport2);
assert.sameValue(globalThis.viaSecondModule, viaStaticImport1);
import('./json-idempotency_FIXTURE.json', { assert: { type: 'json' } })
.then(function(viaDynamicImport) {
assert.sameValue(viaDynamicImport.default, viaStaticImport1);
})
.then($DONE, $DONE);

View File

@ -0,0 +1,23 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-parse-json-module
description: Does not define
info: |
# 1.4 ParseJSONModule ( source )
The abstract operation ParseJSONModule takes a single argument source which
is a String representing the contents of a module.
1. Let json be ? Call(%JSON.parse%, undefined, « source »).
2. Return CreateDefaultExportSyntheticModule(json).
flags: [module]
features: [import-assertions, json-modules]
negative:
phase: parse
type: SyntaxError
---*/
$DONOTEVALUATE();
import value from './json-invalid_FIXTURE.json' assert { type: 'json' };

View File

@ -0,0 +1,3 @@
{
notJson: 0
}

View File

@ -0,0 +1,20 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-parse-json-module
description: Does not define named bindings
info: |
In the early design of JSON modules, contributors considered allowing the
properties of object values in JSON modules to be imported directly by name.
This was ultimately rejected, so attempting to import in this way should
produce a SyntaxError.
flags: [module]
features: [import-assertions, json-modules]
negative:
phase: parse
type: SyntaxError
---*/
$DONOTEVALUATE();
import {name} from './json-named-bindings_FIXTURE.json' assert { type: 'json' };

View File

@ -0,0 +1,3 @@
{
"name": 0
}

View File

@ -0,0 +1,47 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-parse-json-module
description: Correctly parses the JSON representation of an array
info: |
# 1.4 ParseJSONModule ( source )
The abstract operation ParseJSONModule takes a single argument source which
is a String representing the contents of a module.
1. Let json be ? Call(%JSON.parse%, undefined, « source »).
2. Return CreateDefaultExportSyntheticModule(json).
To more fully verify parsing correctness, the source text of the imported
module record includes non-printable characters (specifically, all four forms
of JSON's so-called "whitespace" token) both before and after the "value."
flags: [module]
features: [import-assertions, json-modules]
---*/
import value from './json-value-array_FIXTURE.json' assert { type: 'json' };
assert(Array.isArray(value), 'the exported value is an array');
assert.sameValue(
Object.getPrototypeOf(value),
Array.prototype,
'the exported value is not a subclass of Array'
);
assert.sameValue(Object.getOwnPropertyNames(value).length, 7);
assert.sameValue(value.length, 6);
assert.sameValue(value[0], -1.2345);
assert.sameValue(value[1], true);
assert.sameValue(value[2], 'a string value');
assert.sameValue(value[3], null);
assert.sameValue(Object.getPrototypeOf(value[4]), Object.prototype);
assert.sameValue(Object.getOwnPropertyNames(value[4]).length, 0);
assert(Array.isArray(value[5]), 'the fifth element is an array');
assert.sameValue(
Object.getPrototypeOf(value[5]),
Array.prototype,
'the fifth element is not a subclass of Array'
);
assert.sameValue(Object.getOwnPropertyNames(value[5]).length, 1);

View File

@ -0,0 +1,10 @@
[
-1234.500e-003,
true,
"a string value",
null,
{},
[]
]

View File

@ -0,0 +1,20 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-parse-json-module
description: Correctly parses the JSON representation of a boolean
info: |
# 1.4 ParseJSONModule ( source )
The abstract operation ParseJSONModule takes a single argument source which
is a String representing the contents of a module.
1. Let json be ? Call(%JSON.parse%, undefined, « source »).
2. Return CreateDefaultExportSyntheticModule(json).
flags: [module]
features: [import-assertions, json-modules]
---*/
import value from './json-value-boolean_FIXTURE.json' assert { type: 'json' };
assert.sameValue(value, true);

View File

@ -0,0 +1,20 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-parse-json-module
description: Correctly parses the JSON representation of null
info: |
# 1.4 ParseJSONModule ( source )
The abstract operation ParseJSONModule takes a single argument source which
is a String representing the contents of a module.
1. Let json be ? Call(%JSON.parse%, undefined, « source »).
2. Return CreateDefaultExportSyntheticModule(json).
flags: [module]
features: [import-assertions, json-modules]
---*/
import value from './json-value-null_FIXTURE.json' assert { type: 'json' };
assert.sameValue(value, null);

View File

@ -0,0 +1 @@
null

View File

@ -0,0 +1,20 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-parse-json-module
description: Correctly parses the JSON representation of a number
info: |
# 1.4 ParseJSONModule ( source )
The abstract operation ParseJSONModule takes a single argument source which
is a String representing the contents of a module.
1. Let json be ? Call(%JSON.parse%, undefined, « source »).
2. Return CreateDefaultExportSyntheticModule(json).
flags: [module]
features: [import-assertions, json-modules]
---*/
import value from './json-value-number_FIXTURE.json' assert { type: 'json' };
assert.sameValue(value, -1.2345);

View File

@ -0,0 +1 @@
-1234.500e-003

View File

@ -0,0 +1,67 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-parse-json-module
description: Correctly parses the JSON representation of an ordinary object
info: |
# 1.4 ParseJSONModule ( source )
The abstract operation ParseJSONModule takes a single argument source which
is a String representing the contents of a module.
1. Let json be ? Call(%JSON.parse%, undefined, « source »).
2. Return CreateDefaultExportSyntheticModule(json).
To more fully verify parsing correctness, the source text of the imported
module record includes non-printable characters (specifically, all four forms
of JSON's so-called "whitespace" token) both before and after the "value."
flags: [module]
includes: [propertyHelper.js]
features: [import-assertions, json-modules]
---*/
import value from './json-value-object_FIXTURE.json' assert { type: 'json' };
assert.sameValue(Object.getPrototypeOf(value), Object.prototype);
assert.sameValue(Object.getOwnPropertyNames(value).length, 6);
verifyProperty(value, 'number', {
value: -1.2345,
writable: true,
enumerable: true,
configurable: true
});
verifyProperty(value, 'boolean', {
value: true,
writable: true,
enumerable: true,
configurable: true
});
verifyProperty(value, 'string', {
value: 'a string value',
writable: true,
enumerable: true,
configurable: true
});
verifyProperty(value, 'null', {
value: null,
writable: true,
enumerable: true,
configurable: true
});
assert.sameValue(Object.getPrototypeOf(value.object), Object.prototype);
assert.sameValue(Object.getOwnPropertyNames(value.object).length, 0);
assert(
Array.isArray(value.array), 'the value of the "array" property is an array'
);
assert.sameValue(
Object.getPrototypeOf(value.array),
Array.prototype,
'the value of the "array" property is not a subclass of Array'
);
assert.sameValue(Object.getOwnPropertyNames(value.array).length, 1);

View File

@ -0,0 +1,10 @@
{
"number": -1234.500e-003,
"boolean": true,
"string": "a string value",
"null": null,
"object": {},
"array": []
}

View File

@ -0,0 +1,20 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-parse-json-module
description: Correctly parses the JSON representation of a string
info: |
# 1.4 ParseJSONModule ( source )
The abstract operation ParseJSONModule takes a single argument source which
is a String representing the contents of a module.
1. Let json be ? Call(%JSON.parse%, undefined, « source »).
2. Return CreateDefaultExportSyntheticModule(json).
flags: [module]
features: [import-assertions, json-modules]
---*/
import value from './json-value-string_FIXTURE.json' assert { type: 'json' };
assert.sameValue(value, 'a string value');

View File

@ -0,0 +1 @@
"a string value"

View File

@ -0,0 +1,13 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-parse-json-module
description: May be imported via a module namespace object
flags: [module]
features: [import-assertions, json-modules]
---*/
import * as ns from './json-via-namespace_FIXTURE.json' assert { type: 'json' };
assert.sameValue(Object.getOwnPropertyNames(ns).length, 1);
assert.sameValue(ns.default, 262);

View File

@ -0,0 +1,23 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: WithClause may not have duplicate keys (export declaration)
esid: sec-modules
info: |
WithClause: AttributesKeyword { WithEntries,opt }
- It is a Syntax Error if WithClauseToAttributes of WithClause has two
entries a and b such that a.[[Key]] is b.[[Key]].
features: [import-assertions]
flags: [module]
negative:
phase: parse
type: SyntaxError
---*/
$DONOTEVALUATE();
export * from './import-assertion-3_FIXTURE.js' assert {
type: 'json',
'typ\u0065': ''
};

View File

@ -0,0 +1,24 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: >
WithClause may not have duplicate keys (import declaration without binding)
esid: sec-modules
info: |
WithClause: AttributesKeyword { WithEntries,opt }
- It is a Syntax Error if WithClauseToAttributes of WithClause has two
entries a and b such that a.[[Key]] is b.[[Key]].
features: [import-assertions]
flags: [module]
negative:
phase: parse
type: SyntaxError
---*/
$DONOTEVALUATE();
import './import-assertion-2_FIXTURE.js' assert {
type: 'json',
'typ\u0065': ''
};

View File

@ -0,0 +1,24 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: >
WithClause may not have duplicate keys (import declaration with binding)
esid: sec-modules
info: |
WithClause: AttributesKeyword { WithEntries,opt }
- It is a Syntax Error if WithClauseToAttributes of WithClause has two
entries a and b such that a.[[Key]] is b.[[Key]].
features: [import-assertions]
flags: [module]
negative:
phase: parse
type: SyntaxError
---*/
$DONOTEVALUATE();
import x from './import-assertion-1_FIXTURE.js' assert {
type: 'json',
'typ\u0065': ''
};

View File

@ -0,0 +1,9 @@
// Copyright (C) 2022 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
// When imported, this file will ensure that a linking error happens by
// importing a non-existent binding.
// It can be used to assert that there is a linking error, which means
// that there are no parsing errors.
import { nonExistent } from "./ensure-linking-error_FIXTURE.js";

View File

@ -0,0 +1,47 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: >
`assert` AttributesKeyword in WithClause in ImportDeclaration may not
be preceded by a line terminator
esid: sec-modules
info: |
ImportDeclaration:
import ModuleSpecifier[no LineTerminator here] WithClause;
WithClause:
AttributesKeyword {}
AttributesKeyword { WithEntries ,opt }
AttributesKeyword:
with
[no LineTerminator here] assert
The restriction LineTerminator could be verified more simply with a negative
syntax test. This test is designed to parse successfully in order to verify
the restriction more precisely.
features: [import-assertions, globalThis]
flags: [module, raw]
---*/
var callCount = 0;
// Define a property on the global "this" value so that the effect of the
// expected IdentifierReference can be observed.
Object.defineProperty(globalThis, 'assert', {
get: function() {
callCount += 1;
}
});
import * as x from './import-assertion-1_FIXTURE.js'
assert
{ type: 'json' };
if (x.default !== 262.1) {
throw 'module value incorrectly imported - first declaration';
}
if (callCount !== 1) {
throw 'IdentifierReference not recognized - first declaration';
}

View File

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

View File

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

View File

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

View File

@ -0,0 +1,29 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: WithClause in ImportDeclaration may be empty
esid: sec-modules
info: |
ImportDeclaration:
import ModuleSpecifier[no LineTerminator here] WithClause;
WithClause:
assert {}
assert {WithEntries ,opt}
WithEntries:
AttributeKey : StringLiteral
AttributeKey : StringLiteral , WithEntries
AttributeKey:
IdentifierName
StringLiteral
features: [import-assertions, globalThis]
flags: [module]
---*/
import x from './import-assertion-1_FIXTURE.js' assert {};
import './import-assertion-2_FIXTURE.js' assert {};
export * from './import-assertion-3_FIXTURE.js' assert {};
assert.sameValue(x, 262.1);

Some files were not shown because too many files have changed in this diff Show More