mirror of
https://github.com/tc39/test262.git
synced 2025-07-22 05:24:38 +02:00
Correct typos
This commit is contained in:
parent
ac098dbe6a
commit
62df2cadef
@ -26,7 +26,7 @@ For instance:
|
|||||||
|
|
||||||
Since existing tests do not necessarily reflect the project's current
|
Since existing tests do not necessarily reflect the project's current
|
||||||
best-practices, it's especially important for test authors to familiarize
|
best-practices, it's especially important for test authors to familiarize
|
||||||
themselves with [the contribution guidelines](CONTRIBUTING.md).
|
themselves with [the contribution guidelines](../CONTRIBUTING.md).
|
||||||
|
|
||||||
## Test generation
|
## Test generation
|
||||||
|
|
||||||
@ -55,9 +55,8 @@ file organization can help.
|
|||||||
|
|
||||||
Tests for syntax-derived operations are organized according to the language
|
Tests for syntax-derived operations are organized according to the language
|
||||||
grammar, with directories used to describe non-terminals. For example, tests
|
grammar, with directories used to describe non-terminals. For example, tests
|
||||||
for example, tests for [the `if`
|
for [the `if` statement](https://tc39.es/ecma262/#sec-if-statement) are located
|
||||||
statement](https://tc39.es/ecma262/#sec-if-statement) are located in [the
|
in [the `tests/language/statements/if`
|
||||||
`tests/language/statements/if`
|
|
||||||
directory](https://github.com/tc39/test262/tree/main/test/language/statements/if),
|
directory](https://github.com/tc39/test262/tree/main/test/language/statements/if),
|
||||||
and tests for [the `instanceof`
|
and tests for [the `instanceof`
|
||||||
operator](https://tc39.es/ecma262/#sec-relational-operators) are located in
|
operator](https://tc39.es/ecma262/#sec-relational-operators) are located in
|
||||||
@ -141,10 +140,10 @@ to learn.
|
|||||||
## Syntax tests
|
## Syntax tests
|
||||||
|
|
||||||
When testing a syntactic feature of the language, it can be tempting to write
|
When testing a syntactic feature of the language, it can be tempting to write
|
||||||
tests which verify that some bit of source text does *not* produce a syntax
|
tests which verify only that some bit of source text does *not* produce a
|
||||||
error. Contributors should try to push beyond verifying only the lack of a
|
syntax error. Contributors should try to push beyond verifying only the lack of
|
||||||
syntax error because such tests also have observable semantics. It's better for
|
a syntax error because such tests also have observable semantics. It's better
|
||||||
a test to assert that the expected semantics are followed.
|
for a test to assert that the expected semantics are followed.
|
||||||
|
|
||||||
However, verifying semantics invariably requires inserting still more code, and
|
However, verifying semantics invariably requires inserting still more code, and
|
||||||
that additional code may degrade the tests' precision for verifying syntax. For
|
that additional code may degrade the tests' precision for verifying syntax. For
|
||||||
|
Loading…
x
Reference in New Issue
Block a user