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

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

Issue 2100553003: Token of an empty comment reference should end with EOF. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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/test/generated/parser_test.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 1605 matching lines...) Expand 10 before | Expand all | Expand 10 after
1616 _buildNewUnit(r''' 1616 _buildNewUnit(r'''
1617 f1() { 1617 f1() {
1618 print(12); 1618 print(12);
1619 } 1619 }
1620 f2() { 1620 f2() {
1621 B b = new B((C c) {}); 1621 B b = new B((C c) {});
1622 } 1622 }
1623 '''); 1623 ''');
1624 } 1624 }
1625 1625
1626 test_update_emptyCommentReference() {
1627 _buildOldUnit(r'''
1628 /// Empty [] reference.
1629 class A {}
1630 ''');
1631 _buildNewUnit(r'''
1632 /// Empty [] reference.
1633 class A {}
1634 ''');
1635 }
1636
1626 test_update_rewrittenConstructorName() { 1637 test_update_rewrittenConstructorName() {
1627 _buildOldUnit(r''' 1638 _buildOldUnit(r'''
1628 class A { 1639 class A {
1629 A(); 1640 A();
1630 A.named(); 1641 A.named();
1631 } 1642 }
1632 1643
1633 foo() {} 1644 foo() {}
1634 1645
1635 main() { 1646 main() {
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1832 ClassDeclaration oldClass = _findClassNode(oldUnit, name); 1843 ClassDeclaration oldClass = _findClassNode(oldUnit, name);
1833 expect(oldClass, isNotNull); 1844 expect(oldClass, isNotNull);
1834 element = oldClass.element; 1845 element = oldClass.element;
1835 oldMembers = oldClass.members.toList(); 1846 oldMembers = oldClass.members.toList();
1836 } 1847 }
1837 1848
1838 ClassDeclaration _findClassNode(CompilationUnit unit, String name) => 1849 ClassDeclaration _findClassNode(CompilationUnit unit, String name) =>
1839 unit.declarations.singleWhere((unitMember) => 1850 unit.declarations.singleWhere((unitMember) =>
1840 unitMember is ClassDeclaration && unitMember.name.name == name); 1851 unitMember is ClassDeclaration && unitMember.name.name == name);
1841 } 1852 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/parser_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698