Update tests

This commit is contained in:
topecongiro 2017-08-28 00:18:17 +09:00
parent eb828ed9ff
commit 25bf1741b2
7 changed files with 47 additions and 5 deletions

View File

@ -1,6 +1,19 @@
// rustfmt-wrap_comments: true
// Test attributes and doc comments are preserved.
//! Doc comment
#![attribute]
//! Crate doc comment
// Comment
// Comment on attribute
#![the(attribute)]
// Another comment
#[invalid attribute]
fn foo() {}

View File

@ -53,3 +53,7 @@ trait Ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt<T> where T: Fo
trait WhereList<T, J> where T: Foo, J: Bar {}
trait X /* comment */ {}
trait Y // comment
{
}

View File

@ -1,6 +1,19 @@
// rustfmt-wrap_comments: true
// Test attributes and doc comments are preserved.
//! Doc comment
#![attribute]
//! Crate doc comment
// Comment
// Comment on attribute
#![the(attribute)]
// Another comment
#[invalid attribute]
fn foo() {}
@ -33,11 +46,12 @@ pub fn f2(self) {
fn f3(self) -> Dog {}
/// Blah blah bing.
#[attrib1]
/// Blah blah bing.
#[attrib2]
// Another comment that needs rewrite because it's
// tooooooooooooooooooooooooooooooo loooooooooooong.
// Another comment that needs rewrite because it's tooooooooooooooooooooooooooooooo
// loooooooooooong.
/// Blah blah bing.
fn f4(self) -> Cat {}

View File

@ -83,6 +83,7 @@ fn some_fn3() // some comment some comment some comment some comment some commen
}
fn some_fn4()
// some comment some comment some comment some comment some comment some comment some comment
// some comment some comment some comment some comment some comment some comment
// some comment
{
}

View File

@ -1,5 +1,5 @@
#![allow(dead_code)]
// bar
#![allow(dead_code)] // bar
//! Doc comment
fn test() {
// comment

View File

@ -18,6 +18,11 @@ pub fn new(value: V) -> Self {
}
}
impl X<T> /* comment */ {}
impl Y<T> // comment
{
}
impl<T> Foo for T
// comment1
where

View File

@ -79,3 +79,8 @@ trait WhereList<T, J>
J: Bar,
{
}
trait X /* comment */ {}
trait Y // comment
{
}