Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions tests/testsuite/alt_registry.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use support::ChannelChanger;
use support::registry::{self, alt_api_path, Package};
use support::{execs, paths, project};
use support::{basic_manifest, execs, paths, project};
use support::hamcrest::assert_that;
use std::fs::File;
use std::io::Write;
Expand Down Expand Up @@ -249,15 +249,7 @@ fn registry_and_path_dep_works() {
"#,
)
.file("src/main.rs", "fn main() {}")
.file(
"bar/Cargo.toml",
r#"
[project]
name = "bar"
version = "0.0.1"
authors = []
"#,
)
.file("bar/Cargo.toml", &basic_manifest("bar", "0.0.1"))
.file("bar/src/lib.rs", "")
.build();

Expand Down
51 changes: 6 additions & 45 deletions tests/testsuite/bad_config.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use support::{execs, project};
use support::{basic_manifest, execs, project};
use support::registry::Package;
use support::hamcrest::assert_that;

Expand Down Expand Up @@ -598,30 +598,14 @@ Caused by:
#[test]
fn duplicate_deps() {
let p = project()
.file(
"shim-bar/Cargo.toml",
r#"
[package]
name = "bar"
version = "0.0.1"
authors = []
"#,
)
.file("shim-bar/Cargo.toml", &basic_manifest("bar", "0.0.1"))
.file(
"shim-bar/src/lib.rs",
r#"
pub fn a() {}
"#,
)
.file(
"linux-bar/Cargo.toml",
r#"
[package]
name = "bar"
version = "0.0.1"
authors = []
"#,
)
.file("linux-bar/Cargo.toml", &basic_manifest("bar", "0.0.1"))
.file(
"linux-bar/src/lib.rs",
r#"
Expand Down Expand Up @@ -663,30 +647,14 @@ have a single canonical source path irrespective of build target.
#[test]
fn duplicate_deps_diff_sources() {
let p = project()
.file(
"shim-bar/Cargo.toml",
r#"
[package]
name = "bar"
version = "0.0.1"
authors = []
"#,
)
.file("shim-bar/Cargo.toml", &basic_manifest("bar", "0.0.1"))
.file(
"shim-bar/src/lib.rs",
r#"
pub fn a() {}
"#,
)
.file(
"linux-bar/Cargo.toml",
r#"
[package]
name = "bar"
version = "0.0.1"
authors = []
"#,
)
.file("linux-bar/Cargo.toml", &basic_manifest("bar", "0.0.1"))
.file(
"linux-bar/src/lib.rs",
r#"
Expand Down Expand Up @@ -828,14 +796,7 @@ fn unused_keys_in_virtual_manifest() {
bulid = "foo"
"#,
)
.file(
"bar/Cargo.toml",
r#"
[project]
version = "0.0.1"
name = "bar"
"#,
)
.file("bar/Cargo.toml", &basic_manifest("bar", "0.0.1"))
.file("bar/src/lib.rs", r"")
.build();
assert_that(
Expand Down
75 changes: 9 additions & 66 deletions tests/testsuite/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::str;
use cargo::util::process;
use support::{is_nightly, ChannelChanger};
use support::paths::CargoPathExt;
use support::{basic_bin_manifest, basic_lib_manifest, execs, project};
use support::{basic_manifest, basic_bin_manifest, basic_lib_manifest, execs, project};
use support::hamcrest::{assert_that, existing_file};

#[test]
Expand Down Expand Up @@ -876,15 +876,7 @@ fn lib_with_standard_name() {
}

let p = project()
.file(
"Cargo.toml",
r#"
[package]
name = "syntax"
version = "0.0.1"
authors = []
"#,
)
.file("Cargo.toml", &basic_manifest("syntax", "0.0.1"))
.file(
"src/lib.rs",
"
Expand Down Expand Up @@ -1509,14 +1501,7 @@ fn bench_all_workspace() {
fn bench_foo(_: &mut Bencher) -> () { () }
"#,
)
.file(
"bar/Cargo.toml",
r#"
[project]
name = "bar"
version = "0.1.0"
"#,
)
.file("bar/Cargo.toml", &basic_manifest("bar", "0.1.0"))
.file(
"bar/src/lib.rs",
r#"
Expand Down Expand Up @@ -1572,14 +1557,7 @@ fn bench_all_exclude() {
fn main() {}
"#,
)
.file(
"bar/Cargo.toml",
r#"
[project]
name = "bar"
version = "0.1.0"
"#,
)
.file("bar/Cargo.toml", &basic_manifest("bar", "0.1.0"))
.file(
"bar/src/lib.rs",
r#"
Expand All @@ -1593,14 +1571,7 @@ fn bench_all_exclude() {
}
"#,
)
.file(
"baz/Cargo.toml",
r#"
[project]
name = "baz"
version = "0.1.0"
"#,
)
.file("baz/Cargo.toml", &basic_manifest("baz", "0.1.0"))
.file(
"baz/src/lib.rs",
r#"
Expand Down Expand Up @@ -1636,14 +1607,7 @@ fn bench_all_virtual_manifest() {
members = ["bar", "baz"]
"#,
)
.file(
"bar/Cargo.toml",
r#"
[project]
name = "bar"
version = "0.1.0"
"#,
)
.file("bar/Cargo.toml", &basic_manifest("bar", "0.1.0"))
.file(
"bar/src/lib.rs",
r#"
Expand All @@ -1662,14 +1626,7 @@ fn bench_all_virtual_manifest() {
fn bench_bar(_: &mut Bencher) -> () { () }
"#,
)
.file(
"baz/Cargo.toml",
r#"
[project]
name = "baz"
version = "0.1.0"
"#,
)
.file("baz/Cargo.toml", &basic_manifest("baz", "0.1.0"))
.file(
"baz/src/lib.rs",
r#"
Expand Down Expand Up @@ -1765,14 +1722,7 @@ fn bench_virtual_manifest_all_implied() {
members = ["bar", "baz"]
"#,
)
.file(
"bar/Cargo.toml",
r#"
[project]
name = "bar"
version = "0.1.0"
"#,
)
.file("bar/Cargo.toml", &basic_manifest("bar", "0.1.0"))
.file(
"bar/src/lib.rs",
r#"
Expand All @@ -1789,14 +1739,7 @@ fn bench_virtual_manifest_all_implied() {
fn bench_bar(_: &mut Bencher) -> () { () }
"#,
)
.file(
"baz/Cargo.toml",
r#"
[project]
name = "baz"
version = "0.1.0"
"#,
)
.file("baz/Cargo.toml", &basic_manifest("baz", "0.1.0"))
.file(
"baz/src/lib.rs",
r#"
Expand Down
Loading