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

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

Issue 1498163003: Fix for navigation reginos for instance creations with import prefixes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
« no previous file with comments | « pkg/analysis_server/lib/src/domains/analysis/navigation_dart.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/plugin/protocol/protocol.dart'; 9 import 'package:analysis_server/plugin/protocol/protocol.dart';
10 import 'package:analysis_server/src/constants.dart'; 10 import 'package:analysis_server/src/constants.dart';
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 { 665 {
666 assertHasRegionString('B<A>();', 'B'.length); 666 assertHasRegionString('B<A>();', 'B'.length);
667 assertHasTarget('B() {}', 0); 667 assertHasTarget('B() {}', 0);
668 } 668 }
669 { 669 {
670 assertHasRegion('A>();'); 670 assertHasRegion('A>();');
671 assertHasTarget('A {'); 671 assertHasTarget('A {');
672 } 672 }
673 } 673 }
674 674
675 test_instanceCreation_withImportPrefix_named() async {
676 addTestFile('''
677 import 'dart:async' as ppp;
678 main() {
679 new ppp.Future.value(42);
680 }
681 ''');
682 await prepareNavigation();
683 {
684 assertHasRegion('ppp.');
685 assertHasTarget('ppp;');
686 }
687 assertHasRegion('Future.value');
688 assertHasRegion('value(42)');
689 }
690
675 test_library() async { 691 test_library() async {
676 addTestFile(''' 692 addTestFile('''
677 library my.lib; 693 library my.lib;
678 '''); 694 ''');
679 await prepareNavigation(); 695 await prepareNavigation();
680 assertHasRegionString('my.lib'); 696 assertHasRegionString('my.lib');
681 assertHasTargetString('my.lib'); 697 assertHasTargetString('my.lib');
682 } 698 }
683 699
684 test_multiplyDefinedElement() async { 700 test_multiplyDefinedElement() async {
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 927
912 test_type_void() async { 928 test_type_void() async {
913 addTestFile(''' 929 addTestFile('''
914 void main() { 930 void main() {
915 } 931 }
916 '''); 932 ''');
917 await prepareNavigation(); 933 await prepareNavigation();
918 assertNoRegionAt('void'); 934 assertNoRegionAt('void');
919 } 935 }
920 } 936 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/domains/analysis/navigation_dart.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698