mirror of
https://github.com/tc39/test262.git
synced 2025-05-03 06:20:37 +02:00
ECMA262 allows for an arbitrary number of "ScriptJob"s to run in a given realm. Although there is no standard mechanism for enqueuing these jobs, many implementations offer this functionality through custom APIs. In those hosts, the semantics describing script interactions are directly observable. In order to guarantee conformance to the specification in advance of a standardized API, Test262 now requires that hosts provide a $.evalScript function whose behavior is defined in the project's "INTERPRETING.md" file. Use this host-provided API to ensure that implementations correctly observe the specification text that dictates script interactions. (In writing these tests, I noticed some gaps in coverage that are observable from a single script execution. This patch includes a dedicated commit for these tests that do not require $.evalScript.) * Improve coverage of GlobalDeclarationInstantiation * Add tests for script interactions Use the host-provied `$.evalScript` method to assert conformance to the specification text that defines script interactions. * fixup! Improve coverage of GlobalDeclarationInstantiation
40 lines
1.0 KiB
JavaScript
40 lines
1.0 KiB
JavaScript
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
/*---
|
|
esid: sec-globaldeclarationinstantiation
|
|
es6id: 15.1.8
|
|
description: Globally-declared lexical bindings cannot be deleted
|
|
info: |
|
|
[...]
|
|
16. For each element d in lexDeclarations do
|
|
a. NOTE Lexically declared names are only instantiated here but not
|
|
initialized.
|
|
b. For each element dn of the BoundNames of d do
|
|
i. If IsConstantDeclaration of d is true, then
|
|
1. Perform ? envRec.CreateImmutableBinding(dn, true).
|
|
ii. Else,
|
|
1. Perform ? envRec.CreateMutableBinding(dn, false).
|
|
[...]
|
|
flags: [noStrict]
|
|
---*/
|
|
|
|
let test262let;
|
|
|
|
delete test262let;
|
|
|
|
// Binding values are asserted by a dedicated test. IdentifierReferences serve
|
|
// to ensure that the entries in the environment record persist.
|
|
test262let;
|
|
|
|
const test262const = null;
|
|
|
|
delete test262const;
|
|
|
|
test262const;
|
|
|
|
class test262class {}
|
|
|
|
delete test262class;
|
|
|
|
test262class;
|