Skip to content

Commit

Permalink
Move some tests to subdirectories
Browse files Browse the repository at this point in the history
  • Loading branch information
petrochenkov committed Dec 6, 2020
1 parent 0f6f2d6 commit 4eb9da3
Show file tree
Hide file tree
Showing 139 changed files with 71 additions and 105 deletions.
File renamed without changes.
File renamed without changes.
8 changes: 0 additions & 8 deletions src/test/ui/hidden-rt-injection.rs

This file was deleted.

9 changes: 0 additions & 9 deletions src/test/ui/hidden-rt-injection.stderr

This file was deleted.

8 changes: 0 additions & 8 deletions src/test/ui/hidden-rt-injection2.rs

This file was deleted.

9 changes: 0 additions & 9 deletions src/test/ui/hidden-rt-injection2.stderr

This file was deleted.

17 changes: 0 additions & 17 deletions src/test/ui/import.rs

This file was deleted.

10 changes: 0 additions & 10 deletions src/test/ui/import2.rs

This file was deleted.

4 changes: 0 additions & 4 deletions src/test/ui/import3.rs

This file was deleted.

7 changes: 0 additions & 7 deletions src/test/ui/import4.rs

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions src/test/ui/imports/import-rpass.rs
@@ -0,0 +1,12 @@
// run-pass
mod foo {
pub fn x(y: isize) { println!("{}", y); }
}

mod bar {
use foo::x;
use foo::x as z;
pub fn thing() { x(10); z(10); }
}

pub fn main() { bar::thing(); }
23 changes: 14 additions & 9 deletions src/test/ui/imports/import.rs
@@ -1,12 +1,17 @@
// run-pass
mod foo {
pub fn x(y: isize) { println!("{}", y); }
}
use zed::bar;
use zed::baz; //~ ERROR unresolved import `zed::baz` [E0432]
//~| no `baz` in `zed`
//~| HELP a similar name exists in the module
//~| SUGGESTION bar


mod bar {
use foo::x;
use foo::x as z;
pub fn thing() { x(10); z(10); }
mod zed {
pub fn bar() { println!("bar"); }
use foo; //~ ERROR unresolved import `foo` [E0432]
//~^ no `foo` in the root
}

pub fn main() { bar::thing(); }
fn main() {
zed::foo(); //~ ERROR `foo` is private
bar();
}
File renamed without changes.
9 changes: 9 additions & 0 deletions src/test/ui/imports/import2-rpass.rs
@@ -0,0 +1,9 @@
// run-pass

use zed::bar;

mod zed {
pub fn bar() { println!("bar"); }
}

pub fn main() { bar(); }
13 changes: 7 additions & 6 deletions src/test/ui/imports/import2.rs
@@ -1,9 +1,10 @@
// run-pass

use zed::bar;
use baz::zed::bar; //~ ERROR unresolved import `baz::zed` [E0432]
//~^ could not find `zed` in `baz`

mod baz {}
mod zed {
pub fn bar() { println!("bar"); }
pub fn bar() { println!("bar3"); }
}
fn main() {
bar();
}

pub fn main() { bar(); }
File renamed without changes.
13 changes: 13 additions & 0 deletions src/test/ui/imports/import3-rpass.rs
@@ -0,0 +1,13 @@
// run-pass
#![allow(unused_imports)]

use baz::zed;
use baz::zed::bar;

mod baz {
pub mod zed {
pub fn bar() { println!("bar2"); }
}
}

pub fn main() { bar(); }
15 changes: 3 additions & 12 deletions src/test/ui/imports/import3.rs
@@ -1,13 +1,4 @@
// run-pass
#![allow(unused_imports)]
// error-pattern: unresolved
use main::bar;

use baz::zed;
use baz::zed::bar;

mod baz {
pub mod zed {
pub fn bar() { println!("bar2"); }
}
}

pub fn main() { bar(); }
fn main() { println!("foo"); }
File renamed without changes.
9 changes: 9 additions & 0 deletions src/test/ui/imports/import4-rpass.rs
@@ -0,0 +1,9 @@
// run-pass

use zed::bar;

mod zed {
pub fn bar() { println!("bar"); }
}

pub fn main() { let _zed = 42; bar(); }
10 changes: 4 additions & 6 deletions src/test/ui/imports/import4.rs
@@ -1,9 +1,7 @@
// run-pass
// error-pattern: import

use zed::bar;

mod zed {
pub fn bar() { println!("bar"); }
}
mod a { pub use b::foo; }
mod b { pub use a::foo; }

pub fn main() { let _zed = 42; bar(); }
fn main() { println!("loop"); }
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 4eb9da3

Please sign in to comment.