| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |