blob: 0f6c4a5f6f10bed9cbf232a75c4aa50e2950be23 [file] [log] [blame]
40 columns |
>>> indented line comment (dartbug.com/16383)
class A {
// comment
}
<<<
class A {
// comment
}
>>> line comment on opening line
class A { // comment
}
<<<
class A {
// comment
}
>>> indented block comment
class A {
/* comment */
}
<<<
class A {
/* comment */
}
>>> block comment with trailing newline
class A {/* comment */
}
<<<
class A {
/* comment */
}
>>> block comment with leading newline
class A {
/* comment */}
<<<
class A {
/* comment */
}
>>> inline block comment
class A { /* comment */ }
<<<
class A {/* comment */}
>>> multiple comments on opening line
class A { /* first */ // second
}
<<<
class A {
/* first */ // second
}
>>> multiple inline block comments
class A { /* 1 */ /* 2 */ /* 3 */ }
<<<
class A {/* 1 */ /* 2 */ /* 3 */}
>>> multiline trailing block comment
class A { /* comment
*/ }
<<<
class A {
/* comment
*/
}
>>> lines comments at the start of the line in a class body
class A {
// int a;
// int b;
int c;
}
<<<
class A {
// int a;
// int b;
int c;
}
>>> block comment
class C/* is cool */{
/* int */ foo(/* comment */) => 42;
}
<<<
class C /* is cool */ {
/* int */ foo(/* comment */) => 42;
}
>>> block comment
library foo;
/* A long
* Comment
*/
class C /* is cool */ {
/* int */ foo() => 42;
}
<<<
library foo;
/* A long
* Comment
*/
class C /* is cool */ {
/* int */ foo() => 42;
}
>>> ensure blank line above doc comments
class Foo {var a = 1;
/// doc
var b = 2;}
<<<
class Foo {
var a = 1;
/// doc
var b = 2;
}
>>> remove blank line before beginning of body
class A {
// comment
}
<<<
class A {
// comment
}
>>> nested flush left comment
class Foo {
method() {
// flush
}
}
<<<
class Foo {
method() {
// flush
}
}
>>> nested flush left after non-nested
class Foo {
method() {
// ...
// flush
}
}
<<<
class Foo {
method() {
// ...
// flush
}
}
>>> force doc comment between classes to have two newlines before
class Foo {} /**
*/
class Bar {}
<<<
class Foo {}
/**
*/
class Bar {}
>>> force doc comment between classes to have newline after
class Foo {}
/**
*/ class Bar {}
<<<
class Foo {}
/**
*/
class Bar {}