Skip to content

Commit

Permalink
Add documentation for check-cfg by-default in UI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Urgau authored and tshepang committed May 6, 2024
1 parent 57f4083 commit 27b2b40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/tests/headers.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ found in [`header.rs`] from the compiletest source.
* [`error-pattern`](ui.md#error-pattern) — errors not on a line
* `incremental` — incremental tests not in the incremental test-suite
* `no-prefer-dynamic` — don't use `-C prefer-dynamic`, don't build as a dylib
* `no-auto-check-cfg` — disable auto check-cfg (only for `--check-cfg` tests)
* `force-host` — build only for the host target
* [`revisions`](compiletest.md#revisions) — compile multiple times
* [`forbid-output`](compiletest.md#incremental-tests) — incremental cfail rejects output pattern
Expand Down
3 changes: 3 additions & 0 deletions src/tests/ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,9 @@ multiple `.stderr` files for the different outputs.
In the example above, there would be a `.mir.stderr` and `.thir.stderr` file
with the different outputs of the different revisions.

> Note: cfg revisions also work inside the source code with `#[cfg]` attributes.
>
> By-convention the `FALSE` cfg is used to have an always false config.
## Controlling pass/fail expectations

Expand Down

0 comments on commit 27b2b40

Please sign in to comment.