librustdoc: Parenthesize closure calls in tests to attempt to put out burning tinderbox. rs=rustbot

This commit is contained in:
Patrick Walton 2012-12-03 17:08:52 -08:00
parent b6f1e3084f
commit 7eda4a567d
10 changed files with 28 additions and 28 deletions

View File

@ -85,7 +85,7 @@ mod test {
fn mk_doc(source: ~str) -> doc::Doc {
do astsrv::from_str(source) |srv| {
let doc = extract::from_srv(srv, ~"");
let doc = attr_pass::mk_pass().f(srv, doc);
let doc = (attr_pass::mk_pass().f)(srv, doc);
run(srv, doc)
}
}

View File

@ -239,9 +239,9 @@ fn mk_doc(output_style: config::OutputStyle, +source: ~str) -> doc::Doc {
.. config::default_config(&Path("whatever"))
};
let doc = extract::from_srv(srv, ~"");
let doc = attr_pass::mk_pass().f(srv, doc);
let doc = desc_to_brief_pass::mk_pass().f(srv, doc);
let doc = path_pass::mk_pass().f(srv, doc);
let doc = (attr_pass::mk_pass().f)(srv, doc);
let doc = (desc_to_brief_pass::mk_pass().f)(srv, doc);
let doc = (path_pass::mk_pass().f)(srv, doc);
run(srv, doc, config)
}
}

View File

@ -115,7 +115,7 @@ fn should_request_new_writer_for_each_page() {
let (writer_factory, po) = markdown_writer::future_writer_factory();
let (srv, doc) = test::create_doc_srv(~"mod a { }");
// Split the document up into pages
let doc = page_pass::mk_pass(config::DocPerMod).f(srv, doc);
let doc = (page_pass::mk_pass(config::DocPerMod).f)(srv, doc);
write_markdown(doc, move writer_factory);
// We expect two pages to have been written
for iter::repeat(2) {
@ -147,7 +147,7 @@ fn should_write_title_for_each_page() {
let (writer_factory, po) = markdown_writer::future_writer_factory();
let (srv, doc) = test::create_doc_srv(
~"#[link(name = \"core\")]; mod a { }");
let doc = page_pass::mk_pass(config::DocPerMod).f(srv, doc);
let doc = (page_pass::mk_pass(config::DocPerMod).f)(srv, doc);
write_markdown(doc, move writer_factory);
for iter::repeat(2) {
let (page, markdown) = comm::recv(po);
@ -814,21 +814,21 @@ fn create_doc_srv(+source: ~str) -> (astsrv::Srv, doc::Doc) {
let doc = extract::from_srv(srv, ~"");
debug!("doc (extract): %?", doc);
let doc = tystr_pass::mk_pass().f(srv, doc);
let doc = (tystr_pass::mk_pass().f)(srv, doc);
debug!("doc (tystr): %?", doc);
let doc = path_pass::mk_pass().f(srv, doc);
let doc = (path_pass::mk_pass().f)(srv, doc);
debug!("doc (path): %?", doc);
let doc = attr_pass::mk_pass().f(srv, doc);
let doc = (attr_pass::mk_pass().f)(srv, doc);
debug!("doc (attr): %?", doc);
let doc = desc_to_brief_pass::mk_pass().f(srv, doc);
let doc = (desc_to_brief_pass::mk_pass().f)(srv, doc);
debug!("doc (desc_to_brief): %?", doc);
let doc = unindent_pass::mk_pass().f(srv, doc);
let doc = (unindent_pass::mk_pass().f)(srv, doc);
debug!("doc (unindent): %?", doc);
let doc = sectionalize_pass::mk_pass().f(srv, doc);
let doc = (sectionalize_pass::mk_pass().f)(srv, doc);
debug!("doc (trim): %?", doc);
let doc = trim_pass::mk_pass().f(srv, doc);
let doc = (trim_pass::mk_pass().f)(srv, doc);
debug!("doc (sectionalize): %?", doc);
let doc = markdown_index_pass::mk_pass(config).f(srv, doc);
let doc = (markdown_index_pass::mk_pass(config).f)(srv, doc);
debug!("doc (index): %?", doc);
(srv, doc)
}
@ -853,7 +853,7 @@ fn write_markdown_str_srv(
) -> ~str {
let (writer_factory, po) = markdown_writer::future_writer_factory();
let pass = mk_pass(move writer_factory);
pass.f(srv, doc);
(pass.f)(srv, doc);
return comm::recv(po).second();
}

View File

@ -247,7 +247,7 @@ mod test {
fn mk_doc(+name: ~str, +source: ~str) -> doc::Doc {
do astsrv::from_str(source) |srv| {
let doc = extract::from_srv(srv, name);
let doc = path_pass::mk_pass().f(srv, doc);
let doc = (path_pass::mk_pass().f)(srv, doc);
doc
}
}

View File

@ -234,7 +234,7 @@ mod test {
fn mk_doc(source: ~str) -> doc::Doc {
do astsrv::from_str(source) |srv| {
let doc = extract::from_srv(srv, ~"");
let doc = attr_pass::mk_pass().f(srv, doc);
let doc = (attr_pass::mk_pass().f)(srv, doc);
run(srv, doc)
}
}

View File

@ -14,7 +14,7 @@ fn test() {
let source = ~"mod z { } fn y() { }";
do astsrv::from_str(source) |srv| {
let doc = extract::from_srv(srv, ~"");
let doc = mk_pass().f(srv, doc);
let doc = (mk_pass().f)(srv, doc);
assert doc.cratemod().items[0].name() == ~"y";
assert doc.cratemod().items[1].name() == ~"z";
}

View File

@ -39,7 +39,7 @@ impl int { fn a() { } } \
struct istruct { f: () }";
do astsrv::from_str(source) |srv| {
let doc = extract::from_srv(srv, ~"");
let doc = mk_pass().f(srv, doc);
let doc = (mk_pass().f)(srv, doc);
assert doc.cratemod().items[0].name() == ~"iconst";
assert doc.cratemod().items[1].name() == ~"itype";
assert doc.cratemod().items[2].name() == ~"ienum";

View File

@ -51,7 +51,7 @@ fn test() {
let source = ~"mod z { mod y { } fn x() { } } mod w { }";
do astsrv::from_str(source) |srv| {
let doc = extract::from_srv(srv, ~"");
let doc = mk_pass(~"", name_lteq).f(srv, doc);
let doc = (mk_pass(~"", name_lteq).f)(srv, doc);
assert doc.cratemod().mods()[0].name() == ~"w";
assert doc.cratemod().mods()[1].items[0].name() == ~"x";
assert doc.cratemod().mods()[1].items[1].name() == ~"y";
@ -68,10 +68,10 @@ fn should_be_stable() {
let source = ~"mod a { mod b { } } mod c { mod d { } }";
do astsrv::from_str(source) |srv| {
let doc = extract::from_srv(srv, ~"");
let doc = mk_pass(~"", always_eq).f(srv, doc);
let doc = (mk_pass(~"", always_eq).f)(srv, doc);
assert doc.cratemod().mods()[0].items[0].name() == ~"b";
assert doc.cratemod().mods()[1].items[0].name() == ~"d";
let doc = mk_pass(~"", always_eq).f(srv, doc);
let doc = (mk_pass(~"", always_eq).f)(srv, doc);
assert doc.cratemod().mods()[0].items[0].name() == ~"b";
assert doc.cratemod().mods()[1].items[0].name() == ~"d";
}

View File

@ -276,10 +276,10 @@ mod test {
fn mk_doc(source: ~str) -> doc::Doc {
do astsrv::from_str(source) |srv| {
let doc = extract::from_srv(srv, ~"");
let doc = attr_pass::mk_pass().f(srv, doc);
let doc = desc_to_brief_pass::mk_pass().f(srv, doc);
let doc = sectionalize_pass::mk_pass().f(srv, doc);
mk_pass(~"", |s| str::trim(s) ).f(srv, doc)
let doc = (attr_pass::mk_pass().f)(srv, doc);
let doc = (desc_to_brief_pass::mk_pass().f)(srv, doc);
let doc = (sectionalize_pass::mk_pass().f)(srv, doc);
(mk_pass(~"", |s| str::trim(s) ).f)(srv, doc)
}
}
}

View File

@ -25,8 +25,8 @@ mod test {
fn mk_doc(source: ~str) -> doc::Doc {
do astsrv::from_str(source) |srv| {
let doc = extract::from_srv(srv, ~"");
let doc = attr_pass::mk_pass().f(srv, doc);
mk_pass().f(srv, doc)
let doc = (attr_pass::mk_pass().f)(srv, doc);
(mk_pass().f)(srv, doc)
}
}
}