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

Side by Side Diff: pkg/analyzer/test/generated/incremental_resolver_test.dart

Issue 836763002: Issue 21842. Fix for incremental resolution of function expressions in top-level variables. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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/lib/src/generated/incremental_resolver.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 engine.incremental_resolver_test; 5 library engine.incremental_resolver_test;
6 6
7 import 'package:analyzer/src/generated/ast.dart'; 7 import 'package:analyzer/src/generated/ast.dart';
8 import 'package:analyzer/src/generated/element.dart'; 8 import 'package:analyzer/src/generated/element.dart';
9 import 'package:analyzer/src/generated/engine.dart'; 9 import 'package:analyzer/src/generated/engine.dart';
10 import 'package:analyzer/src/generated/error.dart'; 10 import 'package:analyzer/src/generated/error.dart';
(...skipping 2564 matching lines...) Expand 10 before | Expand all | Expand 10 after
2575 } 2575 }
2576 '''); 2576 ''');
2577 _updateAndValidate(r''' 2577 _updateAndValidate(r'''
2578 main() { 2578 main() {
2579 // edited comment text 2579 // edited comment text
2580 print(0); 2580 print(0);
2581 } 2581 }
2582 '''); 2582 ''');
2583 } 2583 }
2584 2584
2585 void test_endOfLineComment_localFunction_inTopLevelVariable() {
2586 _resolveUnit(r'''
2587 typedef int Binary(one, two, three);
2588
2589 int Global = f((a, b, c) {
2590 return 0; // Some comment
2591 });
2592 ''');
2593 _updateAndValidate(r'''
2594 typedef int Binary(one, two, three);
2595
2596 int Global = f((a, b, c) {
2597 return 0; // Some comment
2598 });
2599 ''');
2600 }
2601
2585 void test_endOfLineComment_remove() { 2602 void test_endOfLineComment_remove() {
2586 _resolveUnit(r''' 2603 _resolveUnit(r'''
2587 main() { 2604 main() {
2588 // some comment 2605 // some comment
2589 print(0); 2606 print(0);
2590 } 2607 }
2591 '''); 2608 ''');
2592 _updateAndValidate(r''' 2609 _updateAndValidate(r'''
2593 main() { 2610 main() {
2594 print(0); 2611 print(0);
(...skipping 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after
4173 _visitList(node.metadata, other.metadata); 4190 _visitList(node.metadata, other.metadata);
4174 _visitNode(node.identifier, other.identifier); 4191 _visitNode(node.identifier, other.identifier);
4175 } 4192 }
4176 4193
4177 static void assertSameResolution(CompilationUnit actual, 4194 static void assertSameResolution(CompilationUnit actual,
4178 CompilationUnit expected) { 4195 CompilationUnit expected) {
4179 _SameResolutionValidator validator = new _SameResolutionValidator(expected); 4196 _SameResolutionValidator validator = new _SameResolutionValidator(expected);
4180 actual.accept(validator); 4197 actual.accept(validator);
4181 } 4198 }
4182 } 4199 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/incremental_resolver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698