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

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

Issue 794863003: Issue 21842. Fix incremental resolving of parameters of function typed parameters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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 2129 matching lines...) Expand 10 before | Expand all | Expand 10 after
2140 void test_topLevelFunction_localVariable_remove() { 2140 void test_topLevelFunction_localVariable_remove() {
2141 _resolveUnit(r''' 2141 _resolveUnit(r'''
2142 int main(int a, int b) { 2142 int main(int a, int b) {
2143 int res = a * b; 2143 int res = a * b;
2144 return a + b; 2144 return a + b;
2145 } 2145 }
2146 '''); 2146 ''');
2147 _resolve(_editString('int res = a * b;', ''), _isBlock); 2147 _resolve(_editString('int res = a * b;', ''), _isBlock);
2148 } 2148 }
2149 2149
2150 void test_topLevelFunction_parameter_inFunctionTyped_rename() {
2151 _resolveUnit(r'''
2152 test(f(int a, int b)) {
2153 }
2154 ''');
2155 _resolve(_editString('test(f(int a', 'test(f2(int a2'), _isDeclaration);
2156 }
2157
2150 void test_topLevelFunction_parameter_rename() { 2158 void test_topLevelFunction_parameter_rename() {
2151 _resolveUnit(r''' 2159 _resolveUnit(r'''
2152 int main(int a, int b) { 2160 int main(int a, int b) {
2153 return a + b; 2161 return a + b;
2154 } 2162 }
2155 '''); 2163 ''');
2156 _resolve(_editString(r'''(int a, int b) { 2164 _resolve(_editString(r'''(int a, int b) {
2157 return a + b;''', r'''(int first, int b) { 2165 return a + b;''', r'''(int first, int b) {
2158 return first + b;'''), _isDeclaration); 2166 return first + b;'''), _isDeclaration);
2159 } 2167 }
(...skipping 1940 matching lines...) Expand 10 before | Expand all | Expand 10 after
4100 _visitList(node.metadata, other.metadata); 4108 _visitList(node.metadata, other.metadata);
4101 _visitNode(node.identifier, other.identifier); 4109 _visitNode(node.identifier, other.identifier);
4102 } 4110 }
4103 4111
4104 static void assertSameResolution(CompilationUnit actual, 4112 static void assertSameResolution(CompilationUnit actual,
4105 CompilationUnit expected) { 4113 CompilationUnit expected) {
4106 _SameResolutionValidator validator = new _SameResolutionValidator(expected); 4114 _SameResolutionValidator validator = new _SameResolutionValidator(expected);
4107 actual.accept(validator); 4115 actual.accept(validator);
4108 } 4116 }
4109 } 4117 }
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