diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-05-12 16:50:57 -0400 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-05-14 12:25:19 -0400 |
| commit | ffcc680f9cc26b5b2cb2f453a89dbcf8144f8b9b (patch) | |
| tree | 8f3f8634548c02309d281d6cdbfd7b34b7ea8c9d /src/librustpkg | |
| parent | 5614e83e817a1d15286a1d4eeb6b665ddf5fe3cb (diff) | |
| download | rust-ffcc680f9cc26b5b2cb2f453a89dbcf8144f8b9b.tar.gz rust-ffcc680f9cc26b5b2cb2f453a89dbcf8144f8b9b.zip | |
Fix test fallout from removing vecs_implicitly_copyable
Diffstat (limited to 'src/librustpkg')
| -rw-r--r-- | src/librustpkg/rustpkg.rc | 1 | ||||
| -rw-r--r-- | src/librustpkg/tests.rs | 25 | ||||
| -rw-r--r-- | src/librustpkg/util.rs | 2 |
3 files changed, 14 insertions, 14 deletions
diff --git a/src/librustpkg/rustpkg.rc b/src/librustpkg/rustpkg.rc index 54713a66c0c..884f0a73589 100644 --- a/src/librustpkg/rustpkg.rc +++ b/src/librustpkg/rustpkg.rc @@ -41,6 +41,7 @@ use context::Ctx; mod conditions; mod context; mod path_util; +#[cfg(test)] mod tests; mod util; mod workspace; diff --git a/src/librustpkg/tests.rs b/src/librustpkg/tests.rs index 486e2959e9e..7f0bfa25086 100644 --- a/src/librustpkg/tests.rs +++ b/src/librustpkg/tests.rs @@ -77,7 +77,6 @@ fn is_rwx(p: &Path) -> bool { } } -#[cfg(test)] fn test_sysroot() -> Path { // Totally gross hack but it's just for test cases. // Infer the sysroot from the exe name and tack "stage2" @@ -107,19 +106,19 @@ fn test_install_valid() { let temp_pkg_id = fake_pkg(); let temp_workspace = mk_temp_workspace(&temp_pkg_id.path); // should have test, bench, lib, and main - ctxt.install(&temp_workspace, temp_pkg_id); + ctxt.install(&temp_workspace, &temp_pkg_id); // Check that all files exist - let exec = target_executable_in_workspace(temp_pkg_id, &temp_workspace); + let exec = target_executable_in_workspace(&temp_pkg_id, &temp_workspace); debug!("exec = %s", exec.to_str()); assert!(os::path_exists(&exec)); assert!(is_rwx(&exec)); - let lib = target_library_in_workspace(temp_pkg_id, &temp_workspace); + let lib = target_library_in_workspace(&temp_pkg_id, &temp_workspace); debug!("lib = %s", lib.to_str()); assert!(os::path_exists(&lib)); assert!(is_rwx(&lib)); // And that the test and bench executables aren't installed - assert!(!os::path_exists(&target_test_in_workspace(temp_pkg_id, &temp_workspace))); - let bench = target_bench_in_workspace(temp_pkg_id, &temp_workspace); + assert!(!os::path_exists(&target_test_in_workspace(&temp_pkg_id, &temp_workspace))); + let bench = target_bench_in_workspace(&temp_pkg_id, &temp_workspace); debug!("bench = %s", bench.to_str()); assert!(!os::path_exists(&bench)); } @@ -140,7 +139,7 @@ fn test_install_invalid() { do cond.trap(|_| { error_occurred = true; }).in { - ctxt.install(&temp_workspace, pkgid); + ctxt.install(&temp_workspace, &pkgid); } } assert!(error_occurred && error1_occurred); @@ -155,19 +154,19 @@ fn test_install_url() { let temp_pkg_id = remote_pkg(); let temp_workspace = mk_temp_workspace(&temp_pkg_id.path); // should have test, bench, lib, and main - ctxt.install(&temp_workspace, temp_pkg_id); + ctxt.install(&temp_workspace, &temp_pkg_id); // Check that all files exist - let exec = target_executable_in_workspace(temp_pkg_id, &temp_workspace); + let exec = target_executable_in_workspace(&temp_pkg_id, &temp_workspace); debug!("exec = %s", exec.to_str()); assert!(os::path_exists(&exec)); assert!(is_rwx(&exec)); - let lib = target_library_in_workspace(temp_pkg_id, &temp_workspace); + let lib = target_library_in_workspace(&temp_pkg_id, &temp_workspace); debug!("lib = %s", lib.to_str()); assert!(os::path_exists(&lib)); assert!(is_rwx(&lib)); // And that the test and bench executables aren't installed - assert!(!os::path_exists(&target_test_in_workspace(temp_pkg_id, &temp_workspace))); - let bench = target_bench_in_workspace(temp_pkg_id, &temp_workspace); + assert!(!os::path_exists(&target_test_in_workspace(&temp_pkg_id, &temp_workspace))); + let bench = target_bench_in_workspace(&temp_pkg_id, &temp_workspace); debug!("bench = %s", bench.to_str()); assert!(!os::path_exists(&bench)); -} \ No newline at end of file +} diff --git a/src/librustpkg/util.rs b/src/librustpkg/util.rs index 779a66f63a9..e9c4b7fde55 100644 --- a/src/librustpkg/util.rs +++ b/src/librustpkg/util.rs @@ -23,7 +23,7 @@ use syntax::codemap::{dummy_sp, spanned, dummy_spanned}; use syntax::ext::base::{mk_ctxt, ext_ctxt}; use syntax::ext::build; use syntax::{ast, attr, codemap, diagnostic, fold}; -use syntax::ast::{meta_name_value, meta_list, attribute, crate_}; +use syntax::ast::{meta_name_value, meta_list, attribute}; use syntax::attr::{mk_attr}; use rustc::back::link::output_type_exe; use rustc::driver::session::{lib_crate, unknown_crate, crate_type}; |
