librustc: Fix some unresolved imports in the test runner. rs=bustage

This commit is contained in:
Patrick Walton 2012-12-27 15:49:26 -08:00
parent c880d0ab76
commit 84ce55e542
5 changed files with 21 additions and 5 deletions

View File

@ -114,7 +114,10 @@ fn get_rpaths_relative_to_output(os: session::os,
fn get_rpath_relative_to_output(os: session::os,
output: &Path,
lib: &Path) -> Path {
lib: &Path)
-> Path {
use core::os;
assert not_win32(os);
// Mac doesn't appear to support $ORIGIN
@ -197,6 +200,12 @@ fn minimize_rpaths(rpaths: &[Path]) -> ~[Path] {
#[cfg(unix)]
mod test {
#[legacy_exports];
use driver::session;
use core::os;
use core::str;
#[test]
fn test_rpaths_to_flags() {
let flags = rpaths_to_flags(~[Path("path1"),

View File

@ -828,6 +828,11 @@ fn list_metadata(sess: Session, path: &Path, out: io::Writer) {
mod test {
#[legacy_exports];
use core::vec;
use std::getopts;
use syntax::attr;
use syntax::diagnostic;
// When the user supplies --test we should implicitly supply --cfg test
#[test]
fn test_switch_implies_cfg_test() {

View File

@ -332,6 +332,7 @@ fn sess_os_to_meta_os(os: os) -> metadata::loader::os {
#[cfg(test)]
mod test {
#[legacy_exports];
use syntax::ast;
use syntax::ast_util;
fn make_crate_type_attr(t: ~str) -> ast::attribute {

View File

@ -238,7 +238,7 @@ fn nospan<T: Copy>(t: T) -> ast::spanned<T> {
}
fn path_node(ids: ~[ast::ident]) -> @ast::path {
@{span: dummy_sp(), global: false, idents: ids, rp: None, types: ~[]}
@{span: dummy_sp(), global: true, idents: ids, rp: None, types: ~[]}
}
fn mk_tests(cx: test_ctxt) -> @ast::item {

View File

@ -23,12 +23,13 @@
use middle;
use util::ppaux::ty_to_str;
use core::{dvec, option, vec};
use core::{dvec, io, option, vec};
use std::ebml::reader::get_doc;
use std::ebml::reader;
use std::ebml::writer::Encoder;
use std::ebml;
use std::map::HashMap;
use std::prettyprint;
use std::serialize;
use std::serialize::{Encodable, EncoderHelpers, DecoderHelpers};
use std::serialize::Decodable;
@ -1071,10 +1072,10 @@ fn roundtrip(in_item: Option<@ast::item>) {
let out_item = decode_item_ast(ebml_doc);
let exp_str = do io::with_str_writer |w| {
in_item.encode(&std::prettyprint::Encoder(w))
in_item.encode(&prettyprint::Serializer(w))
};
let out_str = do io::with_str_writer |w| {
out_item.encode(&std::prettyprint::Encoder(w))
out_item.encode(&prettyprint::Serializer(w))
};
debug!("expected string: %s", exp_str);