diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2018-05-02 08:43:15 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2018-05-04 15:01:28 -0700 |
| commit | fa9e55faeb0b4fac282ed47f20780c05f4efc86d (patch) | |
| tree | 0dd43731c9c58b5a41d1cc4be32821d873b71801 /src/test/rustfix/tuple-float-index.fixed | |
| parent | b2645044039cb59858ec494e0ddacbe597757cdb (diff) | |
| download | rust-fa9e55faeb0b4fac282ed47f20780c05f4efc86d.tar.gz rust-fa9e55faeb0b4fac282ed47f20780c05f4efc86d.zip | |
test: Make a dedicated testsuite for rustfix
This commit adds a dedicated mode to compiletest for running rustfix tests, adding a new `src/test/rustfix` directory which will execute all tests as a "rustfix" test, namely requiring that a `*.fixed` is next to the main file which is the result of the rustfix project's application of fixes. The `rustfix` crate is pulled in to actually perform the fixing, and the rustfix compiletest mode will assert a few properties about the fixing: * The expected fixed output must be the same as rustc's output suggestions applied to the original code. * The fixed code must compile successfully * The fixed code must have no further diagnostics emitted about it
Diffstat (limited to 'src/test/rustfix/tuple-float-index.fixed')
| -rw-r--r-- | src/test/rustfix/tuple-float-index.fixed | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/rustfix/tuple-float-index.fixed b/src/test/rustfix/tuple-float-index.fixed new file mode 100644 index 00000000000..9cb7537b428 --- /dev/null +++ b/src/test/rustfix/tuple-float-index.fixed @@ -0,0 +1,15 @@ +// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// compile-flags: -Z parse-only + +fn main () { + ((1, (2, 3)).1).1; +} |
