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

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

Issue 661193004: Issue 21419. Don't create navigation region for elements without location. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 findRegion(findOffset('new '), 'new'.length, true); 362 findRegion(findOffset('new '), 'new'.length, true);
363 assertHasTarget('A() {}', 0); 363 assertHasTarget('A() {}', 0);
364 } 364 }
365 { 365 {
366 findRegion(findOffset('A();'), 'A'.length, true); 366 findRegion(findOffset('A();'), 'A'.length, true);
367 assertHasTarget('A {'); 367 assertHasTarget('A {');
368 } 368 }
369 }); 369 });
370 } 370 }
371 371
372 test_multiplyDefinedElement() {
373 addFile('$projectPath/bin/libA.dart', 'library A; int TEST = 1;');
374 addFile('$projectPath/bin/libB.dart', 'library B; int TEST = 2;');
375 addTestFile('''
376 import 'libA.dart';
377 import 'libB.dart';
378 main() {
379 TEST;
380 }
381 ''');
382 return prepareNavigation().then((_) {
383 assertNoRegionAt('TEST');
384 });
385 }
386
372 test_operator_arithmetic() { 387 test_operator_arithmetic() {
373 addTestFile(''' 388 addTestFile('''
374 class A { 389 class A {
375 A operator +(other) => null; 390 A operator +(other) => null;
376 A operator -() => null; 391 A operator -() => null;
377 A operator -(other) => null; 392 A operator -(other) => null;
378 A operator *(other) => null; 393 A operator *(other) => null;
379 A operator /(other) => null; 394 A operator /(other) => null;
380 } 395 }
381 main() { 396 main() {
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 test_type_void() { 552 test_type_void() {
538 addTestFile(''' 553 addTestFile('''
539 void main() { 554 void main() {
540 } 555 }
541 '''); 556 ''');
542 return prepareNavigation().then((_) { 557 return prepareNavigation().then((_) {
543 assertNoRegionAt('void'); 558 assertNoRegionAt('void');
544 }); 559 });
545 } 560 }
546 } 561 }
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