| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import 'dart:io'; | 5 import 'dart:io'; |
| 6 | 6 |
| 7 import 'package:path/path.dart'; | 7 import 'package:path/path.dart'; |
| 8 import 'package:unittest/unittest.dart'; | 8 import 'package:unittest/unittest.dart'; |
| 9 | 9 |
| 10 import 'package:analyzer/src/generated/scanner.dart'; | 10 import 'package:analyzer/src/generated/scanner.dart'; |
| (...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 expectCUFormatsTo( | 646 expectCUFormatsTo( |
| 647 'class A {\n' | 647 'class A {\n' |
| 648 ' const factory A() = B;\n' | 648 ' const factory A() = B;\n' |
| 649 '}\n', | 649 '}\n', |
| 650 'class A {\n' | 650 'class A {\n' |
| 651 ' const factory A() = B;\n' | 651 ' const factory A() = B;\n' |
| 652 '}\n' | 652 '}\n' |
| 653 ); | 653 ); |
| 654 }); | 654 }); |
| 655 | 655 |
| 656 test('CU - constructor initializers', () { | |
| 657 expectCUFormatsTo( | |
| 658 'class A {\n' | |
| 659 ' int _a;\n' | |
| 660 ' A(a) : _a = a;\n' | |
| 661 '}\n', | |
| 662 'class A {\n' | |
| 663 ' int _a;\n' | |
| 664 ' A(a)\n' | |
| 665 ' : _a = a;\n' | |
| 666 '}\n' | |
| 667 ); | |
| 668 }); | |
| 669 | |
| 670 test('CU - constructor auto field inits', () { | 656 test('CU - constructor auto field inits', () { |
| 671 expectCUFormatsTo( | 657 expectCUFormatsTo( |
| 672 'class A {\n' | 658 'class A {\n' |
| 673 ' int _a;\n' | 659 ' int _a;\n' |
| 674 ' A(this._a);\n' | 660 ' A(this._a);\n' |
| 675 '}\n', | 661 '}\n', |
| 676 'class A {\n' | 662 'class A {\n' |
| 677 ' int _a;\n' | 663 ' int _a;\n' |
| 678 ' A(this._a);\n' | 664 ' A(this._a);\n' |
| 679 '}\n' | 665 '}\n' |
| (...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1445 input += lines[i++] + '\n'; | 1431 input += lines[i++] + '\n'; |
| 1446 } | 1432 } |
| 1447 while(++i < lines.length && !lines[i].startsWith('>>>')) { | 1433 while(++i < lines.length && !lines[i].startsWith('>>>')) { |
| 1448 expectedOutput += lines[i] + '\n'; | 1434 expectedOutput += lines[i] + '\n'; |
| 1449 } | 1435 } |
| 1450 test('test - (${testIndex++})', () { | 1436 test('test - (${testIndex++})', () { |
| 1451 expectClause(input, expectedOutput); | 1437 expectClause(input, expectedOutput); |
| 1452 }); | 1438 }); |
| 1453 } | 1439 } |
| 1454 } | 1440 } |
| OLD | NEW |