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

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

Issue 1365663002: Tweak navigation for 'part of' directives. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
« 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/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 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 assertHasOperatorRegion('] += 2;', 1, '[]=(index,', 3); 657 assertHasOperatorRegion('] += 2;', 1, '[]=(index,', 3);
658 assertHasOperatorRegion('+= 2;', 2, '+(other)', 1); 658 assertHasOperatorRegion('+= 2;', 2, '+(other)', 1);
659 }); 659 });
660 } 660 }
661 661
662 test_partOf() { 662 test_partOf() {
663 var libCode = 'library lib; part "test.dart";'; 663 var libCode = 'library lib; part "test.dart";';
664 var libFile = addFile('$projectPath/bin/lib.dart', libCode); 664 var libFile = addFile('$projectPath/bin/lib.dart', libCode);
665 addTestFile('part of lib;'); 665 addTestFile('part of lib;');
666 return prepareNavigation().then((_) { 666 return prepareNavigation().then((_) {
667 assertHasRegionString('part of lib'); 667 assertHasRegionString('lib');
668 assertHasFileTarget(libFile, libCode.indexOf('lib;'), 'lib'.length); 668 assertHasFileTarget(libFile, libCode.indexOf('lib;'), 'lib'.length);
669 }); 669 });
670 } 670 }
671 671
672 test_string_export() { 672 test_string_export() {
673 var libCode = 'library lib;'; 673 var libCode = 'library lib;';
674 var libFile = addFile('$projectPath/bin/lib.dart', libCode); 674 var libFile = addFile('$projectPath/bin/lib.dart', libCode);
675 addTestFile('export "lib.dart";'); 675 addTestFile('export "lib.dart";');
676 return prepareNavigation().then((_) { 676 return prepareNavigation().then((_) {
677 assertHasRegionString('"lib.dart"'); 677 assertHasRegionString('"lib.dart"');
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 test_type_void() { 799 test_type_void() {
800 addTestFile(''' 800 addTestFile('''
801 void main() { 801 void main() {
802 } 802 }
803 '''); 803 ''');
804 return prepareNavigation().then((_) { 804 return prepareNavigation().then((_) {
805 assertNoRegionAt('void'); 805 assertNoRegionAt('void');
806 }); 806 });
807 } 807 }
808 } 808 }
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