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

Side by Side Diff: pkg/analyzer/test/src/task/incremental_element_builder_test.dart

Issue 2158083003: Update 'new' in [new Name] comment references. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « pkg/analyzer/lib/src/task/incremental_element_builder.dart ('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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 library analyzer.test.src.task.incremental_element_builder_test; 5 library analyzer.test.src.task.incremental_element_builder_test;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/element/element.dart'; 8 import 'package:analyzer/dart/element/element.dart';
9 import 'package:analyzer/src/dart/ast/utilities.dart'; 9 import 'package:analyzer/src/dart/ast/utilities.dart';
10 import 'package:analyzer/src/dart/element/element.dart'; 10 import 'package:analyzer/src/dart/element/element.dart';
(...skipping 1733 matching lines...) Expand 10 before | Expand all | Expand 10 after
1744 int field; 1744 int field;
1745 1745
1746 /// C1 [C2] 1746 /// C1 [C2]
1747 /// C3 [C4] 1747 /// C3 [C4]
1748 /// C5 [C6] 1748 /// C5 [C6]
1749 void m() {} 1749 void m() {}
1750 } 1750 }
1751 '''); 1751 ''');
1752 } 1752 }
1753 1753
1754 test_update_commentReference_new() {
1755 _buildOldUnit(r'''
1756 /// Comment reference with new [new A].
1757 class A {}
1758 ''');
1759 _buildNewUnit(r'''
1760 class B {}
1761 /// Comment reference with new [new A].
1762 class A {}
1763 ''');
1764 }
1765
1754 test_update_commentReference_notClosed() { 1766 test_update_commentReference_notClosed() {
1755 _buildOldUnit(r''' 1767 _buildOldUnit(r'''
1756 /// [c) 1768 /// [c)
1757 class A {} 1769 class A {}
1758 '''); 1770 ''');
1759 _buildNewUnit(r''' 1771 _buildNewUnit(r'''
1760 int a; 1772 int a;
1761 /// [c) 1773 /// [c)
1762 class A {} 1774 class A {}
1763 '''); 1775 ''');
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
1981 expect(oldClass, isNotNull); 1993 expect(oldClass, isNotNull);
1982 element = oldClass.element; 1994 element = oldClass.element;
1983 oldVersion = element.version; 1995 oldVersion = element.version;
1984 oldMembers = oldClass.members.toList(); 1996 oldMembers = oldClass.members.toList();
1985 } 1997 }
1986 1998
1987 ClassDeclaration _findClassNode(CompilationUnit unit, String name) => 1999 ClassDeclaration _findClassNode(CompilationUnit unit, String name) =>
1988 unit.declarations.singleWhere((unitMember) => 2000 unit.declarations.singleWhere((unitMember) =>
1989 unitMember is ClassDeclaration && unitMember.name.name == name); 2001 unitMember is ClassDeclaration && unitMember.name.name == name);
1990 } 2002 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/task/incremental_element_builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698