Skip to content

Commit 246573d

Browse files
committed
rustdoc: Fix method printing tests
1 parent d597a19 commit 246573d

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/librustdoc/markdown_pass.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -734,8 +734,8 @@ fn should_write_trait_method_header() {
734734
#[test]
735735
fn should_write_trait_method_signature() {
736736
let markdown = test::render(
737-
~"trait i { fn a(); }");
738-
fail_unless!(str::contains(markdown, ~"\n fn a()"));
737+
~"trait i { fn a(&self); }");
738+
fail_unless!(str::contains(markdown, ~"\n fn a(&self)"));
739739
}
740740
741741
fn write_impl(ctxt: &Ctxt, doc: doc::ImplDoc) {
@@ -773,8 +773,8 @@ fn should_write_impl_method_header() {
773773
#[test]
774774
fn should_write_impl_method_signature() {
775775
let markdown = test::render(
776-
~"impl int { fn a() { } }");
777-
fail_unless!(str::contains(markdown, ~"\n fn a()"));
776+
~"impl int { fn a(&mut self) { } }");
777+
fail_unless!(str::contains(markdown, ~"\n fn a(&mut self)"));
778778
}
779779
780780
fn write_type(

src/librustdoc/tystr_pass.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,9 @@ fn get_method_sig(
259259
260260
#[test]
261261
fn should_add_trait_method_sigs() {
262-
let doc = test::mk_doc(~"trait i { fn a<T>() -> int; }");
262+
let doc = test::mk_doc(~"trait i { fn a<T>(&mut self) -> int; }");
263263
fail_unless!(doc.cratemod().traits()[0].methods[0].sig
264-
== Some(~"fn a<T>() -> int"));
264+
== Some(~"fn a<T>(&mut self) -> int"));
265265
}
266266
267267
fn fold_impl(
@@ -318,9 +318,9 @@ fn should_add_impl_self_ty() {
318318
319319
#[test]
320320
fn should_add_impl_method_sigs() {
321-
let doc = test::mk_doc(~"impl int { fn a<T>() -> int { fail!() } }");
321+
let doc = test::mk_doc(~"impl int { fn a<T>(&self) -> int { fail!() } }");
322322
fail_unless!(doc.cratemod().impls()[0].methods[0].sig
323-
== Some(~"fn a<T>() -> int"));
323+
== Some(~"fn a<T>(&self) -> int"));
324324
}
325325
326326
fn fold_type(

0 commit comments

Comments
 (0)