| Index: pkg/analysis_server/test/analysis_notification_occurrences_test.dart
|
| diff --git a/pkg/analysis_server/test/analysis_notification_occurrences_test.dart b/pkg/analysis_server/test/analysis_notification_occurrences_test.dart
|
| index 8507050937490b58d9ea3152966316b0bf868da2..3f2ed6a7505502d20168bb3b751bf5b97f74bda1 100644
|
| --- a/pkg/analysis_server/test/analysis_notification_occurrences_test.dart
|
| +++ b/pkg/analysis_server/test/analysis_notification_occurrences_test.dart
|
| @@ -125,26 +125,6 @@ main() {
|
| });
|
| }
|
|
|
| - test_classType() {
|
| - addTestFile('''
|
| -main() {
|
| - int a = 1;
|
| - int b = 2;
|
| - int c = 3;
|
| -}
|
| -int VVV = 4;
|
| -''');
|
| - return prepareOccurrences().then((_) {
|
| - assertHasRegion('int a');
|
| - expect(testOccurences.element.kind, ElementKind.CLASS);
|
| - expect(testOccurences.element.name, 'int');
|
| - assertHasOffset('int a');
|
| - assertHasOffset('int b');
|
| - assertHasOffset('int c');
|
| - assertHasOffset('int VVV');
|
| - });
|
| - }
|
| -
|
| test_field() {
|
| addTestFile('''
|
| class A {
|
| @@ -238,4 +218,49 @@ main() {
|
| assertHasOffset('VVV);');
|
| });
|
| }
|
| +
|
| + test_type_class() {
|
| + addTestFile('''
|
| +main() {
|
| + int a = 1;
|
| + int b = 2;
|
| + int c = 3;
|
| +}
|
| +int VVV = 4;
|
| +''');
|
| + return prepareOccurrences().then((_) {
|
| + assertHasRegion('int a');
|
| + expect(testOccurences.element.kind, ElementKind.CLASS);
|
| + expect(testOccurences.element.name, 'int');
|
| + assertHasOffset('int a');
|
| + assertHasOffset('int b');
|
| + assertHasOffset('int c');
|
| + assertHasOffset('int VVV');
|
| + });
|
| + }
|
| +
|
| + test_type_dynamic() {
|
| + addTestFile('''
|
| +main() {
|
| + dynamic a = 1;
|
| + dynamic b = 2;
|
| +}
|
| +dynamic V = 3;
|
| +''');
|
| + return prepareOccurrences().then((_) {
|
| + int offset = findOffset('dynamic a');
|
| + findRegion(offset, 'dynamic'.length, false);
|
| + });
|
| + }
|
| +
|
| + test_type_void() {
|
| + addTestFile('''
|
| +void main() {
|
| +}
|
| +''');
|
| + return prepareOccurrences().then((_) {
|
| + int offset = findOffset('void main()');
|
| + findRegion(offset, 'void'.length, false);
|
| + });
|
| + }
|
| }
|
|
|