rust/src/test/ui
bors 9337ad5bae Auto merge of #42103 - jorendorff:master, r=estebank
trace_macro: Show both the macro call and its expansion. #42072.

See #42072 for the initial motivation behind this.

The change is not the minimal fix, but I want this behavior almost every time I use `trace_macros`.
2017-05-27 17:38:11 +00:00
..
borrowck Change error count messages 2017-05-24 16:14:38 +07:00
check_match Change error count messages 2017-05-24 16:14:38 +07:00
codemap_tests Auto merge of #42058 - froydnj:thiscall-support, r=nikomatsakis 2017-05-26 07:36:25 +00:00
compare-method Change error count messages 2017-05-24 16:14:38 +07:00
cross-crate-macro-backtrace Change error count messages 2017-05-24 16:14:38 +07:00
did_you_mean Change error count messages 2017-05-24 16:14:38 +07:00
dropck Change error count messages 2017-05-24 16:14:38 +07:00
fmt Change error count messages 2017-05-24 16:14:38 +07:00
hello_world
impl-trait Rollup merge of #42150 - citizen428:feature/error-count-messages, r=Mark-Simulacrum 2017-05-24 19:50:05 -06:00
invalid-module-declaration Change error count messages 2017-05-24 16:14:38 +07:00
issue-37311-type-length-limit Change error count messages 2017-05-24 16:14:38 +07:00
issue-40402-ref-hints Change error count messages 2017-05-24 16:14:38 +07:00
issue-41652 Change error count messages 2017-05-24 16:14:38 +07:00
lifetime-errors Change error count messages 2017-05-24 16:14:38 +07:00
lifetimes Change error count messages 2017-05-24 16:14:38 +07:00
lint Change error count messages 2017-05-24 16:14:38 +07:00
macros Auto merge of #42103 - jorendorff:master, r=estebank 2017-05-27 17:38:11 +00:00
mismatched_types Rollup merge of #42150 - citizen428:feature/error-count-messages, r=Mark-Simulacrum 2017-05-24 19:50:05 -06:00
missing-items Change error count messages 2017-05-24 16:14:38 +07:00
print_type_sizes Stabilize unions with Copy fields and no destructor 2017-05-27 00:52:20 +03:00
print-fuel
pub Change error count messages 2017-05-24 16:14:38 +07:00
reachable Change error count messages 2017-05-24 16:14:38 +07:00
resolve Rollup merge of #42150 - citizen428:feature/error-count-messages, r=Mark-Simulacrum 2017-05-24 19:50:05 -06:00
span Rollup merge of #42150 - citizen428:feature/error-count-messages, r=Mark-Simulacrum 2017-05-24 19:50:05 -06:00
suggestions Change error count messages 2017-05-24 16:14:38 +07:00
token Change error count messages 2017-05-24 16:14:38 +07:00
type-check Change error count messages 2017-05-24 16:14:38 +07:00
coercion-missing-tail-expected-type.rs Fix error message for mismatched types 2017-04-25 18:28:08 -04:00
coercion-missing-tail-expected-type.stderr Change error count messages 2017-05-24 16:14:38 +07:00
fn_once-moved.rs Add help message if a FnOnce is moved 2017-05-18 21:29:04 +02:00
fn_once-moved.stderr Change error count messages 2017-05-24 16:14:38 +07:00
loop-break-value-no-repeat.rs Stabilize the loop_break_value feature 2017-05-17 21:34:37 +02:00
loop-break-value-no-repeat.stderr Rollup merge of #42150 - citizen428:feature/error-count-messages, r=Mark-Simulacrum 2017-05-24 19:50:05 -06:00
README.md
regions-fn-subtyping-return-static.rs
regions-fn-subtyping-return-static.stderr Change error count messages 2017-05-24 16:14:38 +07:00
static-lifetime.rs Improve E0477 error message 2017-05-09 20:51:18 +02:00
static-lifetime.stderr Change error count messages 2017-05-24 16:14:38 +07:00
update-all-references.sh
update-references.sh

Guide to the UI Tests

The UI tests are intended to capture the compiler's complete output, so that we can test all aspects of the presentation. They work by compiling a file (e.g., hello_world/main.rs), capturing the output, and then applying some normalization (see below). This normalized result is then compared against reference files named hello_world/main.stderr and hello_world/main.stdout. If either of those files doesn't exist, the output must be empty. If the test run fails, we will print out the current output, but it is also saved in build/<target-triple>/test/ui/hello_world/main.stdout (this path is printed as part of the test failure mesage), so you can run diff and so forth.

Editing and updating the reference files

If you have changed the compiler's output intentionally, or you are making a new test, you can use the script update-references.sh to update the references. When you run the test framework, it will report various errors: in those errors is a command you can use to run the update-references.sh script, which will then copy over the files from the build directory and use them as the new reference. You can also just run update-all-references.sh. In both cases, you can run the script with --help to get a help message.

Normalization

The normalization applied is aimed at filenames:

  • the test directory is replaced with $DIR
  • all backslashes () are converted to forward slashes (/) (for windows)