rustdoc: Fix method printing tests
This commit is contained in:
parent
d597a19b30
commit
246573d5ae
@ -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) {
|
||||
@ -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(
|
||||
|
@ -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(
|
||||
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user