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 26 matching lines...) Expand all Loading... |
37 for (NavigationTarget target in testTargets) { | 37 for (NavigationTarget target in testTargets) { |
38 if (targetFiles[target.fileIndex] == file && | 38 if (targetFiles[target.fileIndex] == file && |
39 target.offset == offset && | 39 target.offset == offset && |
40 target.length == length) { | 40 target.length == length) { |
41 testTarget = target; | 41 testTarget = target; |
42 return; | 42 return; |
43 } | 43 } |
44 } | 44 } |
45 fail( | 45 fail( |
46 'Expected to find target (file=$file; offset=$offset; length=$length) in
\n' | 46 'Expected to find target (file=$file; offset=$offset; length=$length) in
\n' |
47 '${testRegion} in\n' | 47 '$testRegion in\n' |
48 '${testTargets.join('\n')}'); | 48 '${testTargets.join('\n')}'); |
49 } | 49 } |
50 | 50 |
51 void assertHasOperatorRegion(String regionSearch, int regionLength, | 51 void assertHasOperatorRegion(String regionSearch, int regionLength, |
52 String targetSearch, int targetLength) { | 52 String targetSearch, int targetLength) { |
53 assertHasRegion(regionSearch, regionLength); | 53 assertHasRegion(regionSearch, regionLength); |
54 assertHasTarget(targetSearch, targetLength); | 54 assertHasTarget(targetSearch, targetLength); |
55 } | 55 } |
56 | 56 |
57 /** | 57 /** |
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
927 | 927 |
928 test_type_void() async { | 928 test_type_void() async { |
929 addTestFile(''' | 929 addTestFile(''' |
930 void main() { | 930 void main() { |
931 } | 931 } |
932 '''); | 932 '''); |
933 await prepareNavigation(); | 933 await prepareNavigation(); |
934 assertNoRegionAt('void'); | 934 assertNoRegionAt('void'); |
935 } | 935 } |
936 } | 936 } |
OLD | NEW |