Skip to content

Commit

Permalink
rustdoc: Fix method printing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
z0w0 committed Mar 17, 2013
1 parent d597a19 commit 246573d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/librustdoc/markdown_pass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -734,8 +734,8 @@ fn should_write_trait_method_header() {
#[test]
fn should_write_trait_method_signature() {
let markdown = test::render(
~"trait i { fn a(); }");
fail_unless!(str::contains(markdown, ~"\n fn a()"));
~"trait i { fn a(&self); }");
fail_unless!(str::contains(markdown, ~"\n fn a(&self)"));
}

fn write_impl(ctxt: &Ctxt, doc: doc::ImplDoc) {
Expand Down Expand Up @@ -773,8 +773,8 @@ fn should_write_impl_method_header() {
#[test]
fn should_write_impl_method_signature() {
let markdown = test::render(
~"impl int { fn a() { } }");
fail_unless!(str::contains(markdown, ~"\n fn a()"));
~"impl int { fn a(&mut self) { } }");
fail_unless!(str::contains(markdown, ~"\n fn a(&mut self)"));
}

fn write_type(
Expand Down
8 changes: 4 additions & 4 deletions src/librustdoc/tystr_pass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,9 @@ fn get_method_sig(

#[test]
fn should_add_trait_method_sigs() {
let doc = test::mk_doc(~"trait i { fn a<T>() -> int; }");
let doc = test::mk_doc(~"trait i { fn a<T>(&mut self) -> int; }");
fail_unless!(doc.cratemod().traits()[0].methods[0].sig
== Some(~"fn a<T>() -> int"));
== Some(~"fn a<T>(&mut self) -> int"));
}

fn fold_impl(
Expand Down Expand Up @@ -318,9 +318,9 @@ fn should_add_impl_self_ty() {

#[test]
fn should_add_impl_method_sigs() {
let doc = test::mk_doc(~"impl int { fn a<T>() -> int { fail!() } }");
let doc = test::mk_doc(~"impl int { fn a<T>(&self) -> int { fail!() } }");
fail_unless!(doc.cratemod().impls()[0].methods[0].sig
== Some(~"fn a<T>() -> int"));
== Some(~"fn a<T>(&self) -> int"));
}

fn fold_type(
Expand Down

5 comments on commit 246573d

@bors
Copy link
Contributor

@bors bors commented on 246573d Mar 17, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 246573d Mar 17, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging z0w0/rust/rustdoc-explicit-self = 246573d into auto

@bors
Copy link
Contributor

@bors bors commented on 246573d Mar 17, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

z0w0/rust/rustdoc-explicit-self = 246573d merged ok, testing candidate = f54adca

@bors
Copy link
Contributor

@bors bors commented on 246573d Mar 17, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 246573d Mar 17, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding incoming to auto = f54adca

Please sign in to comment.