blob: 3143fe182d18324c66d1572d569d7d401ee30c9b [file] [log] [blame]
>>>
if (x &&
y) {
print('!');
}
<<<
if (x && y) {
print('!');
}
>>>
for (var a=0; a<100; ++a) { print(a); }
<<<
for (var a = 0; a < 100; ++a) {
print(a);
}
>>>
for(
var a=0;
a<100;
++a)
{
print(a);
}
<<<
for (var a = 0; a < 100; ++a) {
print(a);
}
>>>
for (x in xs) {
print(x);
}
<<<
for (x in xs) {
print(x);
}
>>>
var primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71];
<<<
var primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59,
61, 67, 71];
>>>
blah() {
print('blah blah blah blah blah blah blah blah blah blah blah blah blah blah $foo');
}
<<<<
blah() {
print(
'blah blah blah blah blah blah blah blah blah blah blah blah blah blah $foo');
}
>>>
assert(false);
<<<
assert(false);
>>> dartbug.com/16384
fish() => []..add(1)..add(2);
<<<
fish() => []
..add(1)
..add(2);
>>>
fish() => []..add(1);
<<<
fish() => []..add(1);
>>> dartbug.com/16382
var m = { };
<<<
var m = {};
>>>
var m = {};
<<<
var m = {};
>>> Indent cases two spaces and case bodies four spaces (dartbug.com/16406)
switches() {
switch (fruit) {
case 'apple':
print('delish');
break;
case 'durian':
print('stinky');
break;
default:
print('nevermind');
break;
}
}
<<<
switches() {
switch (fruit) {
case 'apple':
print('delish');
break;
case 'durian':
print('stinky');
break;
default:
print('nevermind');
break;
}
}
>>> dartbug.com/16383
main() {
//foo
}
<<<
main() {
//foo
}
>>> dartbug.com/16379
var x = new XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX();
<<<
var x =
new XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX();
>>>
main() {
throw new FormatException("This is a long exception message that puts this over 80 columns.");
}
<<<
main() {
throw new FormatException(
"This is a long exception message that puts this over 80 columns.");
}
>>> Empty method bodies may be on a single line (or more)
void main() { }
<<<
void main() {}
>>>
void main() {
}
<<<
void main() {
}
>>> Decls with initializers get their own lines (dartbug.com/16849)
var x, y;
<<<
var x, y;
>>>
var x = 3, y = 4;
<<<
var x = 3,
y = 4;
>>>
var x = 2, y;
<<<
var x = 2,
y;
>>> dartbug.com/16810 [Note: transforms are enabled]
void f() {
var a;;;
}
<<<
void f() {
var a;
}
>>>
while (true);
<<<
while (true);
>>>
for ( ; ; ) {
print('!');
}
<<<
for ( ; ; ) {
print('!');
}
>>>
main() {
var zero = 0;
if (0 == 0) {
zero = 0;
} else if (0 == 1) {
zero = 1;
} else if (0 == 2) {
zero = 2;
}
print(0);
}
<<<
main() {
var zero = 0;
if (0 == 0) {
zero = 0;
} else if (0 == 1) {
zero = 1;
} else if (0 == 2) {
zero = 2;
}
print(0);
}
>>>
main() {
f(a, b) {}
f(0000000000000000000000000000000000000000000000000000000000000000000000, 111);
}
<<<
main() {
f(a, b) {}
f(0000000000000000000000000000000000000000000000000000000000000000000000,
111);
}