# Consolidating compile-fail and ui testing, and possibly others as well

**URL:** <https://internals.rust-lang.org/t/consolidating-compile-fail-and-ui-testing-and-possibly-others-as-well/4896>\
**Category:** compiler\
**Created:** [March 2, 2017, 11:26pm UTC](https://internals.rust-lang.org/t/consolidating-compile-fail-and-ui-testing-and-possibly-others-as-well/4896 "2017-03-02T23:26:19Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![petrochenkov](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/petrochenkov/32/2784_2.png) [@petrochenkov](https://internals.rust-lang.org/u/petrochenkov)\
**Post date:** [March 3, 2017, 2:56am UTC](https://internals.rust-lang.org/t/consolidating-compile-fail-and-ui-testing-and-possibly-others-as-well/4896/2 "2017-03-03T02:56:11Z")

</div>

> [@nikomatsakis](#):
>
> So this is the precise change then that I propose:
> 
> Move all compile-fail tests to ui tests. Simplify to just support //~ ERROR and //~ WARNING; go back to grepping the output instead of parsing JSON. Also, just support matching the "main" message, which is easy to grep Remove all the //~ NOTE, //~ HELP, etc, because those are complicated to grep
> 
> Generate reference tests, naturally

This is exactly what I'd like to see as well. Former compile-fail tests still ensure that erroneous code produces errors, and former ui tests still ensure formatting is good + cross checks for extra reliability, and all this without having to write something like

```rust
//~^ NOTE
//~| NOTE 
//~| NOTE
//~| HELP
//~| HELP
//~| HELP

```

manually.

---

_[View the full topic](https://internals.rust-lang.org/t/consolidating-compile-fail-and-ui-testing-and-possibly-others-as-well/4896)._
