Fix broken tests

This commit is contained in:
James Miller 2013-07-07 10:59:27 +12:00
parent fb19205b1b
commit 1fd735d3c1
3 changed files with 9 additions and 9 deletions

View file

@ -964,7 +964,7 @@ mod test {
}
// this version doesn't care about getting comments or docstrings in.
fn fake_print_crate(s: @pprust::ps, crate: ast::crate) {
fn fake_print_crate(s: @pprust::ps, crate: &ast::crate) {
pprust::print_mod(s, &crate.node.module, crate.node.attrs);
}
@ -995,7 +995,7 @@ mod test {
let ast = string_to_crate(@"#[a] mod b {fn c (d : e, f : g) {h!(i,j,k);l;m}}");
assert_pred!(matches_codepattern,
"matches_codepattern",
pprust::to_str(zz_fold.fold_crate(ast),fake_print_crate,
pprust::to_str(&zz_fold.fold_crate(ast),fake_print_crate,
token::get_ident_interner()),
~"#[a]mod zz{fn zz(zz:zz,zz:zz){zz!(zz,zz,zz);zz;zz}}");
}
@ -1007,7 +1007,7 @@ mod test {
=> (g $(d $d $e)+))} ");
assert_pred!(matches_codepattern,
"matches_codepattern",
pprust::to_str(zz_fold.fold_crate(ast),fake_print_crate,
pprust::to_str(&zz_fold.fold_crate(ast),fake_print_crate,
token::get_ident_interner()),
~"zz!zz((zz$zz:zz$(zz $zz:zz)zz+=>(zz$(zz$zz$zz)+)))");
}

View file

@ -482,7 +482,7 @@ mod test {
assert_eq!(parser.parse_arg_general(true),
ast::arg{
is_mutbl: false,
ty: @ast::Ty{id:3, // fixme
ty: ast::Ty{id:3, // fixme
node: ast::ty_path(ast::Path{
span:sp(4,4), // this is bizarre...
// check this in the original parser?
@ -490,7 +490,7 @@ mod test {
idents:~[str_to_ident("int")],
rp: None,
types: ~[]},
@None, 2),
None, 2),
span:sp(4,7)},
pat: @ast::pat{id:1,
node: ast::pat_ident(ast::bind_infer,
@ -519,14 +519,14 @@ mod test {
node: ast::item_fn(ast::fn_decl{
inputs: ~[ast::arg{
is_mutbl: false,
ty: @ast::Ty{id:3, // fixme
ty: ast::Ty{id:3, // fixme
node: ast::ty_path(ast::Path{
span:sp(10,13),
global:false,
idents:~[str_to_ident("int")],
rp: None,
types: ~[]},
@None, 2),
None, 2),
span:sp(10,13)},
pat: @ast::pat{id:1, // fixme
node: ast::pat_ident(
@ -542,7 +542,7 @@ mod test {
span: sp(6,7)},
id: 4 // fixme
}],
output: @ast::Ty{id:5, // fixme
output: ast::Ty{id:5, // fixme
node: ast::ty_nil,
span:sp(15,15)}, // not sure
cf: ast::return_val

View file

@ -2272,7 +2272,7 @@ mod test {
let decl = ast::fn_decl {
inputs: ~[],
output: @ast::Ty {id: 0,
output: ast::Ty {id: 0,
node: ast::ty_nil,
span: codemap::dummy_sp()},
cf: ast::return_val