Update import attributes tests to use the `with` keyword

This commit is contained in:
Nicolò Ribaudo 2023-09-13 13:51:31 +02:00 committed by Philip Chimento
parent e15f566216
commit 3ddb9e5e95
49 changed files with 161 additions and 175 deletions

View File

@ -8,7 +8,7 @@ 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]
features: [dynamic-import, import-attributes, async-functions]
flags: [async]
---*/

View File

@ -8,7 +8,7 @@ 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]
features: [dynamic-import, import-attributes, async-functions]
flags: [async]
---*/

View File

@ -12,7 +12,7 @@ info: |
a. Let optionsRef be the result of evaluating optionsExpression.
b. Let options be ? GetValue(optionsRef).
[...]
features: [dynamic-import, import-assertions]
features: [dynamic-import, import-attributes]
---*/
var beforeCount = 0;

View File

@ -12,7 +12,7 @@ info: |
a. Let optionsRef be the result of evaluating optionsExpression.
b. Let options be ? GetValue(optionsRef).
[...]
features: [dynamic-import, import-assertions]
features: [dynamic-import, import-attributes]
---*/
var beforeCount = 0;

View File

@ -12,7 +12,7 @@ info: |
a. Let optionsRef be the result of evaluating optionsExpression.
b. Let options be ? GetValue(optionsRef).
[...]
features: [dynamic-import, import-assertions]
features: [dynamic-import, import-attributes]
---*/
var log = [];

View File

@ -16,13 +16,13 @@ info: |
b. Let assertionsObj be Get(options, "assert").
c. IfAbruptRejectPromise(assertionsObj, promiseCapability).
[...]
features: [dynamic-import, import-assertions]
features: [dynamic-import, import-attributes]
flags: [async]
---*/
var thrown = new Test262Error();
var options = {
get assert() {
get with() {
throw thrown;
}
};

View File

@ -7,7 +7,7 @@ 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]
features: [dynamic-import, import-attributes]
flags: [async]
---*/

View File

@ -16,7 +16,7 @@ info: |
i. Perform ! Call(promiseCapability.[[Reject]], undefined, « a newly created TypeError object »).
ii. Return promiseCapability.[[Promise]].
[...]
features: [dynamic-import, import-assertions, Symbol, BigInt]
features: [dynamic-import, import-attributes, Symbol, BigInt]
flags: [async]
---*/

View File

@ -9,7 +9,7 @@ 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]
features: [dynamic-import, import-attributes]
flags: [async]
---*/

View File

@ -9,7 +9,7 @@ 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]
features: [dynamic-import, import-attributes]
flags: [async]
---*/

View File

@ -21,13 +21,13 @@ info: |
ii. Let keys be EnumerableOwnPropertyNames(assertionsObj, key).
iii. IfAbruptRejectPromise(keys, promiseCapability).
[...]
features: [dynamic-import, import-assertions, Proxy]
features: [dynamic-import, import-attributes, Proxy]
flags: [async]
---*/
var thrown = new Test262Error();
var options = {
assert: new Proxy({}, {
with: new Proxy({}, {
ownKeys: function() {
throw thrown;
},

View File

@ -22,7 +22,7 @@ info: |
[...]
ii. Let keys be EnumerableOwnPropertyNames(assertionsObj, key).
[...]
features: [dynamic-import, import-assertions, json-modules, Symbol, Proxy]
features: [dynamic-import, import-attributes, json-modules, Symbol, Proxy]
flags: [async]
---*/
@ -36,7 +36,7 @@ var descriptors = {
var log = [];
var options = {
assert: new Proxy({}, {
with: new Proxy({}, {
ownKeys: function() {
return ["type"];
},

View File

@ -22,7 +22,7 @@ info: |
[...]
ii. Let keys be EnumerableOwnPropertyNames(assertionsObj, key).
[...]
features: [dynamic-import, import-assertions, Symbol, Proxy]
features: [dynamic-import, import-attributes, Symbol, Proxy]
flags: [async]
---*/
@ -38,7 +38,7 @@ var descriptors = {
};
var options = {
assert: new Proxy({}, {
with: new Proxy({}, {
ownKeys: function() {
return [symbol, 'nonEnumerable', 'absent'];
},

View File

@ -23,7 +23,7 @@ info: |
newly created TypeError object »).
2. Return promiseCapability.[[Promise]].
[...]
features: [dynamic-import, import-assertions, Symbol, BigInt]
features: [dynamic-import, import-attributes, Symbol, BigInt]
flags: [async]
---*/
@ -36,12 +36,12 @@ function test(promise, 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')
test(import('./2nd-param_FIXTURE.js', {with:null}), 'null'),
test(import('./2nd-param_FIXTURE.js', {with:false}), 'boolean'),
test(import('./2nd-param_FIXTURE.js', {with:23}), 'number'),
test(import('./2nd-param_FIXTURE.js', {with:''}), 'string'),
test(import('./2nd-param_FIXTURE.js', {with:Symbol('')}), 'symbol'),
test(import('./2nd-param_FIXTURE.js', {with:23n}), 'bigint')
])
.then(function() {})
.then($DONE, $DONE);

View File

@ -21,13 +21,13 @@ info: |
newly created TypeError object »).
2. Return promiseCapability.[[Promise]].
[...]
features: [dynamic-import, import-assertions, Symbol, BigInt]
features: [dynamic-import, import-attributes, Symbol, BigInt]
flags: [async]
---*/
Promise.all([
import('./2nd-param_FIXTURE.js', {}),
import('./2nd-param_FIXTURE.js', {assert:undefined}),
import('./2nd-param_FIXTURE.js', {with:undefined}),
])
.then(function(values) {
assert.sameValue(values[0].default, 262);

View File

@ -19,13 +19,13 @@ info: |
1. Let value be Get(assertionsObj, key).
2. IfAbruptRejectPromise(value, promiseCapability).
[...]
features: [dynamic-import, import-assertions]
features: [dynamic-import, import-attributes]
flags: [async]
---*/
var thrown = new Test262Error();
import('./2nd-param_FIXTURE.js', {assert:{get ''() { throw thrown; }}})
import('./2nd-param_FIXTURE.js', {with:{get ''() { throw thrown; }}})
.then(function() {
throw new Test262Error('Expected promise to be rejected, but it was fulfilled');
}, function(error) {

View File

@ -22,7 +22,7 @@ info: |
newly created TypeError object »).
b. Return promiseCapability.[[Promise]].
[...]
features: [dynamic-import, import-assertions, Symbol, BigInt]
features: [dynamic-import, import-attributes, Symbol, BigInt]
flags: [async]
---*/
@ -35,13 +35,13 @@ function test(promise, 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')
test(import('./2nd-param_FIXTURE.js', {with:{'': undefined}}), 'undefined'),
test(import('./2nd-param_FIXTURE.js', {with:{'': null}}), 'null'),
test(import('./2nd-param_FIXTURE.js', {with:{'': false}}), 'boolean'),
test(import('./2nd-param_FIXTURE.js', {with:{'': 23}}), 'number'),
test(import('./2nd-param_FIXTURE.js', {with:{'': Symbol('')}}), 'symbol'),
test(import('./2nd-param_FIXTURE.js', {with:{'': 23n}}), 'bigint'),
test(import('./2nd-param_FIXTURE.js', {with:{'': {}}}), 'object')
])
.then(function() {})
.then($DONE, $DONE);

View File

@ -8,7 +8,7 @@ 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]
features: [dynamic-import, import-attributes]
flags: [async]
---*/

View File

@ -8,7 +8,7 @@ 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]
features: [dynamic-import, import-attributes]
flags: [onlyStrict]
negative:
phase: parse

View File

@ -8,7 +8,7 @@ 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]
features: [dynamic-import, import-attributes]
flags: [async, noStrict]
---*/

View File

@ -9,7 +9,7 @@ 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]
features: [dynamic-import, import-attributes]
flags: [async]
---*/

View File

@ -9,7 +9,7 @@ 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]
features: [dynamic-import, import-attributes]
flags: [async]
---*/

View File

@ -5,10 +5,10 @@ esid: sec-parse-json-module
description: Creates extensible arrays
flags: [module]
includes: [propertyHelper.js]
features: [import-assertions, json-modules]
features: [import-attributes, json-modules]
---*/
import value from './json-value-array_FIXTURE.json' assert { type: 'json' };
import value from './json-value-array_FIXTURE.json' with { type: 'json' };
value.test262property = 'test262 value';

View File

@ -5,10 +5,10 @@ esid: sec-parse-json-module
description: Creates extensible objects
flags: [module]
includes: [propertyHelper.js]
features: [import-assertions, json-modules]
features: [import-attributes, json-modules]
---*/
import value from './json-value-object_FIXTURE.json' assert { type: 'json' };
import value from './json-value-object_FIXTURE.json' with { type: 'json' };
value.test262property = 'test262 value';

View File

@ -1,6 +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' };
import value from './json-idempotency_FIXTURE.json' with { type: 'json' };
globalThis.viaSecondModule = value;

View File

@ -4,17 +4,17 @@
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]
features: [import-attributes, 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 viaStaticImport1 from './json-idempotency_FIXTURE.json' with { type: 'json' };
import {default as viaStaticImport2} from './json-idempotency_FIXTURE.json' with { 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' } })
import('./json-idempotency_FIXTURE.json', { with: { type: 'json' } })
.then(function(viaDynamicImport) {
assert.sameValue(viaDynamicImport.default, viaStaticImport1);
})

View File

@ -12,7 +12,7 @@ info: |
1. Let json be ? Call(%JSON.parse%, undefined, « source »).
2. Return CreateDefaultExportSyntheticModule(json).
flags: [module]
features: [import-assertions, json-modules]
features: [import-attributes, json-modules]
negative:
phase: parse
type: SyntaxError
@ -20,4 +20,4 @@ negative:
$DONOTEVALUATE();
import value from './json-invalid_FIXTURE.json' assert { type: 'json' };
import value from './json-invalid_FIXTURE.json' with { type: 'json' };

View File

@ -9,7 +9,7 @@ info: |
This was ultimately rejected, so attempting to import in this way should
produce a SyntaxError.
flags: [module]
features: [import-assertions, json-modules]
features: [import-attributes, json-modules]
negative:
phase: parse
type: SyntaxError
@ -17,4 +17,4 @@ negative:
$DONOTEVALUATE();
import {name} from './json-named-bindings_FIXTURE.json' assert { type: 'json' };
import {name} from './json-named-bindings_FIXTURE.json' with { type: 'json' };

View File

@ -16,10 +16,10 @@ info: |
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]
features: [import-attributes, json-modules]
---*/
import value from './json-value-array_FIXTURE.json' assert { type: 'json' };
import value from './json-value-array_FIXTURE.json' with { type: 'json' };
assert(Array.isArray(value), 'the exported value is an array');
assert.sameValue(

View File

@ -12,9 +12,9 @@ info: |
1. Let json be ? Call(%JSON.parse%, undefined, « source »).
2. Return CreateDefaultExportSyntheticModule(json).
flags: [module]
features: [import-assertions, json-modules]
features: [import-attributes, json-modules]
---*/
import value from './json-value-boolean_FIXTURE.json' assert { type: 'json' };
import value from './json-value-boolean_FIXTURE.json' with { type: 'json' };
assert.sameValue(value, true);

View File

@ -12,9 +12,9 @@ info: |
1. Let json be ? Call(%JSON.parse%, undefined, « source »).
2. Return CreateDefaultExportSyntheticModule(json).
flags: [module]
features: [import-assertions, json-modules]
features: [import-attributes, json-modules]
---*/
import value from './json-value-null_FIXTURE.json' assert { type: 'json' };
import value from './json-value-null_FIXTURE.json' with { type: 'json' };
assert.sameValue(value, null);

View File

@ -12,9 +12,9 @@ info: |
1. Let json be ? Call(%JSON.parse%, undefined, « source »).
2. Return CreateDefaultExportSyntheticModule(json).
flags: [module]
features: [import-assertions, json-modules]
features: [import-attributes, json-modules]
---*/
import value from './json-value-number_FIXTURE.json' assert { type: 'json' };
import value from './json-value-number_FIXTURE.json' with { type: 'json' };
assert.sameValue(value, -1.2345);

View File

@ -17,10 +17,10 @@ info: |
of JSON's so-called "whitespace" token) both before and after the "value."
flags: [module]
includes: [propertyHelper.js]
features: [import-assertions, json-modules]
features: [import-attributes, json-modules]
---*/
import value from './json-value-object_FIXTURE.json' assert { type: 'json' };
import value from './json-value-object_FIXTURE.json' with { type: 'json' };
assert.sameValue(Object.getPrototypeOf(value), Object.prototype);
assert.sameValue(Object.getOwnPropertyNames(value).length, 6);

View File

@ -12,9 +12,9 @@ info: |
1. Let json be ? Call(%JSON.parse%, undefined, « source »).
2. Return CreateDefaultExportSyntheticModule(json).
flags: [module]
features: [import-assertions, json-modules]
features: [import-attributes, json-modules]
---*/
import value from './json-value-string_FIXTURE.json' assert { type: 'json' };
import value from './json-value-string_FIXTURE.json' with { type: 'json' };
assert.sameValue(value, 'a string value');

View File

@ -4,10 +4,10 @@
esid: sec-parse-json-module
description: May be imported via a module namespace object
flags: [module]
features: [import-assertions, json-modules]
features: [import-attributes, json-modules]
---*/
import * as ns from './json-via-namespace_FIXTURE.json' assert { type: 'json' };
import * as ns from './json-via-namespace_FIXTURE.json' with { type: 'json' };
assert.sameValue(Object.getOwnPropertyNames(ns).length, 1);
assert.sameValue(ns.default, 262);

View File

@ -0,0 +1,33 @@
// Copyright (C) 2021 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: >
`with` AttributesKeyword in WithClause in ImportDeclaration can
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
negative:
phase: resolution
type: SyntaxError
features: [import-attributes, globalThis]
flags: [module, raw]
---*/
throw "Test262: This statement should not be evaluated.";
import "./ensure-linking-error_FIXTURE.js";
import * as x from './import-attribute-1_FIXTURE.js'
with
{ type: 'foo' };

View File

@ -8,7 +8,7 @@ info: |
- 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]
features: [import-attributes]
flags: [module]
negative:
phase: parse
@ -17,7 +17,7 @@ negative:
$DONOTEVALUATE();
export * from './import-assertion-3_FIXTURE.js' assert {
export * from './import-attribute-3_FIXTURE.js' with {
type: 'json',
'typ\u0065': ''
};

View File

@ -9,7 +9,7 @@ info: |
- 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]
features: [import-attributes]
flags: [module]
negative:
phase: parse
@ -18,7 +18,7 @@ negative:
$DONOTEVALUATE();
import './import-assertion-2_FIXTURE.js' assert {
import './import-attribute-2_FIXTURE.js' with {
type: 'json',
'typ\u0065': ''
};

View File

@ -9,7 +9,7 @@ info: |
- 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]
features: [import-attributes]
flags: [module]
negative:
phase: parse
@ -18,7 +18,7 @@ negative:
$DONOTEVALUATE();
import x from './import-assertion-1_FIXTURE.js' assert {
import x from './import-attribute-1_FIXTURE.js' with {
type: 'json',
'typ\u0065': ''
};

View File

@ -1,47 +0,0 @@
// 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

@ -8,8 +8,8 @@ info: |
import ModuleSpecifier[no LineTerminator here] WithClause;
WithClause:
assert {}
assert {WithEntries ,opt}
AttributesKeyword {}
AttributesKeyword {WithEntries ,opt}
WithEntries:
AttributeKey : StringLiteral
@ -18,12 +18,12 @@ info: |
AttributeKey:
IdentifierName
StringLiteral
features: [import-assertions, globalThis]
features: [import-attributes, 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 {};
import x from './import-attribute-1_FIXTURE.js' with {};
import './import-attribute-2_FIXTURE.js' with {};
export * from './import-attribute-3_FIXTURE.js' with {};
assert.sameValue(x, 262.1);

View File

@ -9,8 +9,8 @@ info: |
import ModuleSpecifier[no LineTerminator here] WithClause;
WithClause:
assert {}
assert {WithEntries ,opt}
AttributesKeyword {}
AttributesKeyword {WithEntries ,opt}
WithEntries:
AttributeKey : StringLiteral
@ -22,7 +22,7 @@ info: |
negative:
phase: resolution
type: SyntaxError
features: [import-assertions]
features: [import-attributes]
flags: [module]
---*/
@ -30,8 +30,8 @@ $DONOTEVALUATE();
import "./ensure-linking-error_FIXTURE.js";
import x from './import-assertion-1_FIXTURE.js' assert {if:''};
import './import-assertion-2_FIXTURE.js' assert {if:''};
export * from './import-assertion-3_FIXTURE.js' assert {if:''};
import x from './import-attribute-1_FIXTURE.js' with {if:''};
import './import-attribute-2_FIXTURE.js' with {if:''};
export * from './import-attribute-3_FIXTURE.js' with {if:''};
assert.sameValue(x, 262.1);

View File

@ -9,8 +9,8 @@ info: |
import ModuleSpecifier[no LineTerminator here] WithClause;
WithClause:
assert {}
assert {WithEntries ,opt}
AttributesKeyword {}
AttributesKeyword {WithEntries ,opt}
WithEntries:
AttributeKey : StringLiteral
@ -22,7 +22,7 @@ info: |
negative:
phase: resolution
type: SyntaxError
features: [import-assertions, globalThis]
features: [import-attributes, globalThis]
flags: [module]
---*/
@ -30,8 +30,8 @@ $DONOTEVALUATE();
import "./ensure-linking-error_FIXTURE.js";
import x from './import-assertion-1_FIXTURE.js' assert {"test262\u0078":''};
import './import-assertion-2_FIXTURE.js' assert {"test262\u0078":''};
export * from './import-assertion-3_FIXTURE.js' assert {"test262\u0078":''};
import x from './import-attribute-1_FIXTURE.js' with {"test262\u0078":''};
import './import-attribute-2_FIXTURE.js' with {"test262\u0078":''};
export * from './import-attribute-3_FIXTURE.js' with {"test262\u0078":''};
assert.sameValue(x, 262.1);

View File

@ -9,8 +9,8 @@ info: |
import ModuleSpecifier[no LineTerminator here] WithClause;
WithClause:
assert {}
assert {WithEntries ,opt}
AttributesKeyword {}
AttributesKeyword {WithEntries ,opt}
WithEntries:
AttributeKey : StringLiteral
@ -22,7 +22,7 @@ info: |
negative:
phase: resolution
type: SyntaxError
features: [import-assertions, globalThis]
features: [import-attributes, globalThis]
flags: [module]
---*/
@ -30,8 +30,8 @@ $DONOTEVALUATE();
import "./ensure-linking-error_FIXTURE.js";
import x from './import-assertion-1_FIXTURE.js' assert {'test262\u0078':''};
import './import-assertion-2_FIXTURE.js' assert {'test262\u0078':''};
export * from './import-assertion-3_FIXTURE.js' assert {'test262\u0078':''};
import x from './import-attribute-1_FIXTURE.js' with {'test262\u0078':''};
import './import-attribute-2_FIXTURE.js' with {'test262\u0078':''};
export * from './import-attribute-3_FIXTURE.js' with {'test262\u0078':''};
assert.sameValue(x, 262.1);

View File

@ -9,8 +9,8 @@ info: |
import ModuleSpecifier[no LineTerminator here] WithClause;
WithClause:
assert {}
assert {WithEntries ,opt}
AttributesKeyword {}
AttributesKeyword {WithEntries ,opt}
WithEntries:
AttributeKey : StringLiteral
@ -22,7 +22,7 @@ info: |
negative:
phase: resolution
type: SyntaxError
features: [import-assertions, globalThis]
features: [import-attributes, globalThis]
flags: [module]
---*/
@ -30,6 +30,6 @@ $DONOTEVALUATE();
import "./ensure-linking-error_FIXTURE.js";
import x from './import-assertion-1_FIXTURE.js' assert {test262_1:'',test262_2:'',test262_3:'',test262_4:''};
import './import-assertion-2_FIXTURE.js' assert {test262_1:'',test262_2:'',test262_3:'',test262_4:''};
export * from './import-assertion-3_FIXTURE.js' assert {test262_1:'',test262_2:'',test262_3:'',test262_4:''};
import x from './import-attribute-1_FIXTURE.js' with {test262_1:'',test262_2:'',test262_3:'',test262_4:''};
import './import-attribute-2_FIXTURE.js' with {test262_1:'',test262_2:'',test262_3:'',test262_4:''};
export * from './import-attribute-3_FIXTURE.js' with {test262_1:'',test262_2:'',test262_3:'',test262_4:''};

View File

@ -9,8 +9,8 @@ info: |
import ModuleSpecifier[no LineTerminator here] WithClause;
WithClause:
assert {}
assert {WithEntries ,opt}
AttributesKeyword {}
AttributesKeyword {WithEntries ,opt}
WithEntries:
AttributeKey : StringLiteral
@ -25,7 +25,7 @@ info: |
negative:
phase: resolution
type: SyntaxError
features: [import-assertions, globalThis]
features: [import-attributes, globalThis]
flags: [module]
---*/
@ -33,7 +33,7 @@ $DONOTEVALUATE();
import "./ensure-linking-error_FIXTURE.js";
import x from './import-assertion-1_FIXTURE.js' assert
import x from './import-attribute-1_FIXTURE.js' with
{
@ -44,7 +44,7 @@ import x from './import-assertion-1_FIXTURE.js' assert
''
};
import './import-assertion-2_FIXTURE.js' assert
import './import-attribute-2_FIXTURE.js' with
{
@ -55,7 +55,7 @@ import './import-assertion-2_FIXTURE.js' assert
''
};
export * from './import-assertion-3_FIXTURE.js' assert
export * from './import-attribute-3_FIXTURE.js' with
{

View File

@ -9,8 +9,8 @@ info: |
import ModuleSpecifier[no LineTerminator here] WithClause;
WithClause:
assert {}
assert {WithEntries ,opt}
AttributesKeyword {}
AttributesKeyword {WithEntries ,opt}
WithEntries:
AttributeKey : StringLiteral
@ -22,7 +22,7 @@ info: |
negative:
phase: resolution
type: SyntaxError
features: [import-assertions, globalThis]
features: [import-attributes, globalThis]
flags: [module]
---*/
@ -30,6 +30,6 @@ $DONOTEVALUATE();
import "./ensure-linking-error_FIXTURE.js";
import x from './import-assertion-1_FIXTURE.js' assert {test262:'',};
import './import-assertion-2_FIXTURE.js' assert {test262:'',};
export * from './import-assertion-3_FIXTURE.js' assert {test262:'',};
import x from './import-attribute-1_FIXTURE.js' with {test262:'',};
import './import-attribute-2_FIXTURE.js' with {test262:'',};
export * from './import-attribute-3_FIXTURE.js' with {test262:'',};

View File

@ -9,8 +9,8 @@ info: |
import ModuleSpecifier[no LineTerminator here] WithClause;
WithClause:
assert {}
assert {WithEntries ,opt}
AttributesKeyword {}
AttributesKeyword {WithEntries ,opt}
WithEntries:
AttributeKey : StringLiteral
@ -22,7 +22,7 @@ info: |
negative:
phase: resolution
type: SyntaxError
features: [import-assertions, globalThis]
features: [import-attributes, globalThis]
flags: [module]
---*/
@ -30,6 +30,6 @@ $DONOTEVALUATE();
import "./ensure-linking-error_FIXTURE.js";
import x from './import-assertion-1_FIXTURE.js' assert {test262:"\u0078"};
import './import-assertion-2_FIXTURE.js' assert {test262:"\u0078"};
export * from './import-assertion-3_FIXTURE.js' assert {test262:"\u0078"};
import x from './import-attribute-1_FIXTURE.js' with {test262:"\u0078"};
import './import-attribute-2_FIXTURE.js' with {test262:"\u0078"};
export * from './import-attribute-3_FIXTURE.js' with {test262:"\u0078"};

View File

@ -9,8 +9,8 @@ info: |
import ModuleSpecifier[no LineTerminator here] WithClause;
WithClause:
assert {}
assert {WithEntries ,opt}
AttributesKeyword {}
AttributesKeyword {WithEntries ,opt}
WithEntries:
AttributeKey : StringLiteral
@ -19,7 +19,7 @@ info: |
AttributeKey:
IdentifierName
StringLiteral
features: [import-assertions, globalThis]
features: [import-attributes, globalThis]
negative:
phase: resolution
type: SyntaxError
@ -30,6 +30,6 @@ $DONOTEVALUATE();
import "./ensure-linking-error_FIXTURE.js";
import x from './import-assertion-1_FIXTURE.js' assert {test262:'\u0078'};
import './import-assertion-2_FIXTURE.js' assert {test262:'\u0078'};
export * from './import-assertion-3_FIXTURE.js' assert {test262:'\u0078'};
import x from './import-attribute-1_FIXTURE.js' with {test262:'\u0078'};
import './import-attribute-2_FIXTURE.js' with {test262:'\u0078'};
export * from './import-attribute-3_FIXTURE.js' with {test262:'\u0078'};