INTERPRETING.md/CONTRIBUTING.md: revised rules for _FIXTURE.js files (#2135)

This commit is contained in:
Rick Waldron 2019-04-24 10:59:54 -04:00 committed by Leo Balter
parent ba013cf7fc
commit cfe59eec64
2 changed files with 8 additions and 5 deletions

View File

@ -234,6 +234,13 @@ function Test262Error(message) {
}
```
## Rules For Module `_FIXTURE.js` Files
The [Module section of INTERPRETING.md](https://github.com/tc39/test262/blob/master/INTERPRETING.md#modules) states that `_FIXTURE.js` files will not have have Realm modifications applied. In practice, this means that code in `_FIXTURE.js` files must abide by the following rules:
- **MUST NOT** refer to, or make use of any [Test262-Defined Bindings](https://github.com/tc39/test262/blob/master/INTERPRETING.md#test262-defined-bindings) in any way.
- **MUST NOT** refer to, or make use of any [Host-Defined Functions](https://github.com/tc39/test262/blob/master/INTERPRETING.md#host-defined-functions) in any way.
## Handling Errors and Negative Test Cases
Expectations for **parsing errors** should be declared using [the `negative` frontmatter flag](#negative). They must also include `$DONOTEVALUATE();` (in order to guarantee that implementations do not execute the code):

View File

@ -135,11 +135,7 @@ This must precede any additional text modifications described by test metadata.
### Modules
Test262 includes tests for ECMAScript 2015 module code, denoted by the "module"
metadata flag. Files bearing a name ending in `_FIXTURE.js`:
- **MUST NOT** be interpreted as standalone tests; they are intended to be referenced by test files.
- **MUST NOT** refer to, or make use of any [Test262-Defined Bindings](#test262-defined-bindings) in any way.
- **MUST NOT** refer to, or make use of any [Host-Defined Functions](#host-defined-functions) in any way.
metadata flag. Files bearing a name ending in `_FIXTURE.js` **MUST NOT** be interpreted as standalone tests; they are intended to be referenced by test files. Realm modifications, including [Test262-Defined Bindings](#test262-defined-bindings) and [Host-Defined Functions](#host-defined-functions), are not applied to code executed from `_FIXTURE.js` files. See the [**Rules For Module `_FIXTURE.js` Files** section of CONTRIBUTING.md](https://github.com/tc39/test262/blob/master/CONTRIBUTING.md#rules-for-module-fixturejs-files) for more information.
All module specifiers used by Test262 begin with the character sequence `./`.
The remaining characters should be interpreted as the name of a file within the