diff options
| author | 许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com> | 2024-02-10 14:33:31 +0000 |
|---|---|---|
| committer | 许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com> | 2024-02-16 19:40:23 +0000 |
| commit | e53d6dd35bb38b81dff4b00497f4c152e9009499 (patch) | |
| tree | f97c2cd49d3d3b54b330c1e955c8cc7dba14f7ce /tests/ui/README.md | |
| parent | d2e8ecd8bd26a22111cdebfb813258450b07fbf0 (diff) | |
| download | rust-e53d6dd35bb38b81dff4b00497f4c152e9009499.tar.gz rust-e53d6dd35bb38b81dff4b00497f4c152e9009499.zip | |
Implement infra support for migrating from `//` to `//@` ui test directives
Diffstat (limited to 'tests/ui/README.md')
| -rw-r--r-- | tests/ui/README.md | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/ui/README.md b/tests/ui/README.md new file mode 100644 index 00000000000..c14d0ee78c8 --- /dev/null +++ b/tests/ui/README.md @@ -0,0 +1,35 @@ +# UI Tests + +This folder contains `rustc`'s +[UI tests](https://rustc-dev-guide.rust-lang.org/tests/ui.html). + +## Test Directives (Headers) + +Typically, a UI test will have some test directives / headers which are +special comments that tell compiletest how to build and intepret a test. + +As part of an on-going effort to rewrite compiletest +(see <https://github.com/rust-lang/compiler-team/issues/536>), a major +change proposal to change legacy compiletest-style headers `// <directive>` +to [`ui_test`](https://github.com/oli-obk/ui_test)-style headers +`//@ <directive>` was accepted (see +<https://github.com/rust-lang/compiler-team/issues/512>. + +An example directive is `ignore-test`. In legacy compiletest style, the header +would be written as + +```rs +// ignore-test +``` + +but in `ui_test` style, the header would be written as + +```rs +//@ ignore-test +``` + +compiletest is changed to accept only `//@` directives for UI tests +(currently), and will reject and report an error if it encounters any +comments `// <content>` that may be parsed as an legacy compiletest-style +test header. To fix this, you should migrate to the `ui_test`-style header +`//@ <content>`. |
