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

Side by Side Diff: pkg/analysis_server/test/analysis/notification_navigation_test.dart

Issue 616953002: Fix for NPE when FieldFormalParameterElement references an unresolved field. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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/analysis_server/lib/src/computer/computer_navigation.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 test.analysis.notification.navigation; 5 library test.analysis.notification.navigation;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/constants.dart'; 9 import 'package:analysis_server/src/constants.dart';
10 import 'package:analysis_server/src/protocol.dart'; 10 import 'package:analysis_server/src/protocol.dart';
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 class AAA { 226 class AAA {
227 int fff = 123; 227 int fff = 123;
228 AAA(this.fff); 228 AAA(this.fff);
229 } 229 }
230 '''); 230 ''');
231 return prepareNavigation().then((_) { 231 return prepareNavigation().then((_) {
232 assertHasRegionTarget('fff);', 'fff = 123'); 232 assertHasRegionTarget('fff);', 'fff = 123');
233 }); 233 });
234 } 234 }
235 235
236 test_fieldFormalParameter_unresolved() {
237 addTestFile('''
238 class AAA {
239 AAA(this.fff);
240 }
241 ''');
242 return prepareNavigation().then((_) {
243 assertNoRegion('fff);', 3);
244 });
245 }
246
236 test_identifier_resolved() { 247 test_identifier_resolved() {
237 addTestFile(''' 248 addTestFile('''
238 class AAA {} 249 class AAA {}
239 main() { 250 main() {
240 AAA aaa = null; 251 AAA aaa = null;
241 print(aaa); 252 print(aaa);
242 } 253 }
243 '''); 254 ''');
244 return prepareNavigation().then((_) { 255 return prepareNavigation().then((_) {
245 assertHasRegionTarget('AAA aaa', 'AAA {}'); 256 assertHasRegionTarget('AAA aaa', 'AAA {}');
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 test_type_void() { 498 test_type_void() {
488 addTestFile(''' 499 addTestFile('''
489 void main() { 500 void main() {
490 } 501 }
491 '''); 502 ''');
492 return prepareNavigation().then((_) { 503 return prepareNavigation().then((_) {
493 assertNoRegionAt('void'); 504 assertNoRegionAt('void');
494 }); 505 });
495 } 506 }
496 } 507 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/computer/computer_navigation.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698