Commit graph

14 commits

Author SHA1 Message Date
Dale Wijnand 43b42d6f4c
Reorganise the testsuite crate module hierarchy
* Collapse the nested cargotest::support module into the cargotest
  module (merge the mod.rs's)
* Rename the cargotest module to support
* Nest the top-level hamcrest module into support
2018-07-22 08:46:44 +01:00
Dale Wijnand 7fe2fbc8a3
Remove the argument from the project test support function
By rewriting the tests, with rerast (https://github.com/google/rerast),
to use the newly introduced "at" method.

First I added the following temporary function to cargotest::support:

    pub fn project_foo() -> ProjectBuilder {
        project("foo")
    }

Then I defined the following rewrite.rs:

    use cargotest::support::{ project, project_foo };

    fn rule1(a: &'static str) {
        replace!(project("foo") => project_foo());
        replace!(project(a) => project_foo().at(a));
    }

Then I ran rerast:

    cargo +nightly rerast --rules_file=rewrite.rs --force --targets tests --file tests/testsuite/main.rs

Finally I searched and replaced the references to project_foo with
argument-less project (a little awkardly on macOS with a git clean).

    find tests -type f -exec sed -i -e 's/project_foo/project/g' {} +
    git clean -d tests
2018-07-20 13:31:50 +01:00
Eric Huss e881999fb3 Deprecate doc profile.
Fixes #5434
2018-05-05 08:52:19 -07:00
Eric Huss 9ca36de444 Move profile override tests to a dedicated file. 2018-04-27 13:42:30 -07:00
Eric Huss ec7be849e3 Some test cleanup for profiles. 2018-04-27 13:42:30 -07:00
Eric Huss c667fc231d Add more profile override validation tests. 2018-04-27 13:42:30 -07:00
Eric Huss ba537d73b9 Add test for profile override on non-dev/release. 2018-04-27 13:42:30 -07:00
Eric Huss 36b8769025 Add warning if panic is set in test or bench profile. 2018-04-27 13:42:30 -07:00
Eric Huss a0a880c36e Add warnings for unknown profile overrides. 2018-04-27 13:42:30 -07:00
Eric Huss 7051b630c8 Update for some review comments. 2018-04-27 13:42:29 -07:00
Eric Huss 62d6f0d023 Minor cleanup. 2018-04-27 13:22:01 -07:00
Eric Huss 575d6e819c Profile Overrides (RFC #2282 Part 1) 2018-04-27 13:22:00 -07:00
Alex Crichton 1e6828485e cargo fmt 2018-03-14 17:48:23 -07:00
André Rocha c2ff988c9f Reorganize integration tests as one crate with many modules. Issue #4867. 2018-02-21 13:33:51 -05:00
Renamed from tests/profiles.rs (Browse further)