Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1271)

Side by Side Diff: pkg/analyzer/test/services/formatter_test.dart

Issue 141443011: Constructor initializer indent fixes. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/analyzer/test/services/data/cu_tests.data ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/services/data/cu_tests.data ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698