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/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'; |
11 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 11 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
12 import 'package:unittest/unittest.dart'; | 12 import 'package:unittest/unittest.dart'; |
13 | 13 |
14 import '../analysis_abstract.dart'; | 14 import '../analysis_abstract.dart'; |
| 15 import '../utils.dart'; |
15 | 16 |
16 main() { | 17 main() { |
| 18 initializeTestEnvironment(); |
17 defineReflectiveTests(_AnalysisNotificationOutlineTest); | 19 defineReflectiveTests(_AnalysisNotificationOutlineTest); |
18 } | 20 } |
19 | 21 |
20 @reflectiveTest | 22 @reflectiveTest |
21 class _AnalysisNotificationOutlineTest extends AbstractAnalysisTest { | 23 class _AnalysisNotificationOutlineTest extends AbstractAnalysisTest { |
22 Outline outline; | 24 Outline outline; |
23 | 25 |
24 Future prepareOutline() { | 26 Future prepareOutline() { |
25 addAnalysisSubscription(AnalysisService.OUTLINE, testFile); | 27 addAnalysisSubscription(AnalysisService.OUTLINE, testFile); |
26 return waitForTasksFinished(); | 28 return waitForTasksFinished(); |
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 } | 810 } |
809 | 811 |
810 void _isEnumConstant(Outline outline, String name) { | 812 void _isEnumConstant(Outline outline, String name) { |
811 Element element = outline.element; | 813 Element element = outline.element; |
812 expect(element.kind, ElementKind.ENUM_CONSTANT); | 814 expect(element.kind, ElementKind.ENUM_CONSTANT); |
813 expect(element.name, name); | 815 expect(element.name, name); |
814 expect(element.parameters, isNull); | 816 expect(element.parameters, isNull); |
815 expect(element.returnType, isNull); | 817 expect(element.returnType, isNull); |
816 } | 818 } |
817 } | 819 } |
OLD | NEW |