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.outline; | 5 library test.analysis.notification.outline; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:analysis_server/protocol/protocol.dart'; | 9 import 'package:analysis_server/protocol/protocol.dart'; |
10 import 'package:analysis_server/protocol/protocol_generated.dart'; | 10 import 'package:analysis_server/protocol/protocol_generated.dart'; |
11 import 'package:analysis_server/src/constants.dart'; | 11 import 'package:analysis_server/src/constants.dart'; |
12 import 'package:test/test.dart'; | 12 import 'package:test/test.dart'; |
13 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 13 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
14 | 14 |
15 import '../analysis_abstract.dart'; | 15 import '../analysis_abstract.dart'; |
16 | 16 |
17 main() { | 17 main() { |
18 defineReflectiveSuite(() { | 18 defineReflectiveSuite(() { |
19 defineReflectiveTests(_AnalysisNotificationOutlineTest); | 19 defineReflectiveTests(_AnalysisNotificationOutlineTest); |
20 }); | 20 }); |
21 } | 21 } |
22 | 22 |
23 @reflectiveTest | 23 @reflectiveTest |
24 class _AnalysisNotificationOutlineTest extends AbstractAnalysisTest { | 24 class _AnalysisNotificationOutlineTest extends AbstractAnalysisTest { |
25 FileKind fileKind; | 25 FileKind fileKind; |
26 String libraryName; | 26 String libraryName; |
27 Outline outline; | 27 Outline outline; |
28 | 28 |
| 29 @override |
| 30 bool get enableNewAnalysisDriver => false; |
| 31 |
29 Future prepareOutline() { | 32 Future prepareOutline() { |
30 addAnalysisSubscription(AnalysisService.OUTLINE, testFile); | 33 addAnalysisSubscription(AnalysisService.OUTLINE, testFile); |
31 return waitForTasksFinished(); | 34 return waitForTasksFinished(); |
32 } | 35 } |
33 | 36 |
34 void processNotification(Notification notification) { | 37 void processNotification(Notification notification) { |
35 if (notification.event == ANALYSIS_OUTLINE) { | 38 if (notification.event == ANALYSIS_OUTLINE) { |
36 var params = new AnalysisOutlineParams.fromNotification(notification); | 39 var params = new AnalysisOutlineParams.fromNotification(notification); |
37 if (params.file == testFile) { | 40 if (params.file == testFile) { |
38 fileKind = params.kind; | 41 fileKind = params.kind; |
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
843 } | 846 } |
844 | 847 |
845 void _isEnumConstant(Outline outline, String name) { | 848 void _isEnumConstant(Outline outline, String name) { |
846 Element element = outline.element; | 849 Element element = outline.element; |
847 expect(element.kind, ElementKind.ENUM_CONSTANT); | 850 expect(element.kind, ElementKind.ENUM_CONSTANT); |
848 expect(element.name, name); | 851 expect(element.name, name); |
849 expect(element.parameters, isNull); | 852 expect(element.parameters, isNull); |
850 expect(element.returnType, isNull); | 853 expect(element.returnType, isNull); |
851 } | 854 } |
852 } | 855 } |
OLD | NEW |