~? annotation type is special
It does not do any line matching, so it should be separated from the other types.
This commit is contained in:
parent
5d24aedfa5
commit
eeafdb1de6
|
|
@ -192,7 +192,7 @@ They have several forms, but generally are a comment with the diagnostic level
|
||||||
to write out the entire message, just make sure to include the important part of
|
to write out the entire message, just make sure to include the important part of
|
||||||
the message to make it self-documenting.
|
the message to make it self-documenting.
|
||||||
|
|
||||||
The error annotation needs to match with the line of the diagnostic. There are
|
Most error annotations need to match with the line of the diagnostic. There are
|
||||||
several ways to match the message with the line (see the examples below):
|
several ways to match the message with the line (see the examples below):
|
||||||
|
|
||||||
* `~`: Associates the error level and message with the *current* line
|
* `~`: Associates the error level and message with the *current* line
|
||||||
|
|
@ -205,9 +205,6 @@ several ways to match the message with the line (see the examples below):
|
||||||
* `~v`: Associates the error level and message with the *next* error
|
* `~v`: Associates the error level and message with the *next* error
|
||||||
annotation line. Each symbol (`v`) that you add adds a line to this, so `~vvv`
|
annotation line. Each symbol (`v`) that you add adds a line to this, so `~vvv`
|
||||||
is three lines below the error annotation line.
|
is three lines below the error annotation line.
|
||||||
* `~?`: Used to match error levels and messages with errors not having line
|
|
||||||
information. These can be placed on any line in the test file, but are
|
|
||||||
conventionally placed at the end.
|
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
|
|
@ -222,6 +219,10 @@ The space character between `//~` (or other variants) and the subsequent text is
|
||||||
negligible (i.e. there is no semantic difference between `//~ ERROR` and
|
negligible (i.e. there is no semantic difference between `//~ ERROR` and
|
||||||
`//~ERROR` although the former is more common in the codebase).
|
`//~ERROR` although the former is more common in the codebase).
|
||||||
|
|
||||||
|
`~? <diagnostic kind>` (example being `~? ERROR`)
|
||||||
|
is used to match diagnostics without line information.
|
||||||
|
These can be placed on any line in the test file, but are conventionally placed at the end.
|
||||||
|
|
||||||
### Error annotation examples
|
### Error annotation examples
|
||||||
|
|
||||||
Here are examples of error annotations on different lines of UI test source.
|
Here are examples of error annotations on different lines of UI test source.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue