Skip to content

Commit

Permalink
librustdoc: Parenthesize closure calls in tests to attempt to put out…
Browse files Browse the repository at this point in the history
… burning tinderbox. rs=rustbot
  • Loading branch information
pcwalton committed Dec 4, 2012
1 parent b6f1e30 commit 7eda4a5
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion src/librustdoc/desc_to_brief_pass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/librustdoc/markdown_index_pass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,9 @@ mod test {
.. 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)
}
}
Expand Down
22 changes: 11 additions & 11 deletions src/librustdoc/markdown_pass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -814,21 +814,21 @@ mod test {

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)
}
Expand All @@ -853,7 +853,7 @@ mod test {
) -> ~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();
}

Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/markdown_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/sectionalize_pass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/sort_item_name_pass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/sort_item_type_pass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fn test() {
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";
Expand Down
6 changes: 3 additions & 3 deletions src/librustdoc/sort_pass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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";
}
Expand Down
8 changes: 4 additions & 4 deletions src/librustdoc/text_pass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}
4 changes: 2 additions & 2 deletions src/librustdoc/trim_pass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}

0 comments on commit 7eda4a5

Please sign in to comment.