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.domain.analysis; | 5 library test.domain.analysis; |
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/analysis_server.dart'; | 10 import 'package:analysis_server/src/analysis_server.dart'; |
11 import 'package:analysis_server/src/constants.dart'; | 11 import 'package:analysis_server/src/constants.dart'; |
12 import 'package:analysis_server/src/domain_analysis.dart'; | 12 import 'package:analysis_server/src/domain_analysis.dart'; |
13 import 'package:analysis_server/src/plugin/server_plugin.dart'; | 13 import 'package:analysis_server/src/plugin/server_plugin.dart'; |
14 import 'package:analyzer/file_system/memory_file_system.dart'; | 14 import 'package:analyzer/file_system/memory_file_system.dart'; |
15 import 'package:analyzer/instrumentation/instrumentation.dart'; | 15 import 'package:analyzer/instrumentation/instrumentation.dart'; |
16 import 'package:analyzer/src/generated/sdk.dart'; | 16 import 'package:analyzer/src/generated/sdk.dart'; |
17 import 'package:plugin/manager.dart'; | 17 import 'package:plugin/manager.dart'; |
| 18 import 'package:test/test.dart'; |
18 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 19 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
19 import 'package:unittest/unittest.dart'; | |
20 | 20 |
21 import 'analysis_abstract.dart'; | 21 import 'analysis_abstract.dart'; |
22 import 'mock_sdk.dart'; | 22 import 'mock_sdk.dart'; |
23 import 'mocks.dart'; | 23 import 'mocks.dart'; |
24 import 'utils.dart'; | 24 import 'utils.dart'; |
25 | 25 |
26 main() { | 26 main() { |
27 initializeTestEnvironment(); | 27 initializeTestEnvironment(); |
28 | 28 |
29 defineReflectiveTests(AnalysisDomainTest); | 29 defineReflectiveSuite(() { |
30 defineReflectiveTests(SetSubscriptionsTest); | 30 defineReflectiveTests(AnalysisDomainTest); |
| 31 defineReflectiveTests(SetSubscriptionsTest); |
| 32 }); |
31 | 33 |
32 MockServerChannel serverChannel; | 34 MockServerChannel serverChannel; |
33 MemoryResourceProvider resourceProvider; | 35 MemoryResourceProvider resourceProvider; |
34 AnalysisServer server; | 36 AnalysisServer server; |
35 AnalysisDomainHandler handler; | 37 AnalysisDomainHandler handler; |
36 | 38 |
37 setUp(() { | 39 setUp(() { |
38 serverChannel = new MockServerChannel(); | 40 serverChannel = new MockServerChannel(); |
39 resourceProvider = new MemoryResourceProvider(); | 41 resourceProvider = new MemoryResourceProvider(); |
40 ExtensionManager manager = new ExtensionManager(); | 42 ExtensionManager manager = new ExtensionManager(); |
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
774 test_beforeAnalysis() async { | 776 test_beforeAnalysis() async { |
775 addTestFile('int V = 42;'); | 777 addTestFile('int V = 42;'); |
776 createProject(); | 778 createProject(); |
777 // subscribe | 779 // subscribe |
778 addAnalysisSubscription(AnalysisService.HIGHLIGHTS, testFile); | 780 addAnalysisSubscription(AnalysisService.HIGHLIGHTS, testFile); |
779 // wait for analysis | 781 // wait for analysis |
780 await waitForTasksFinished(); | 782 await waitForTasksFinished(); |
781 expect(filesHighlights[testFile], isNotEmpty); | 783 expect(filesHighlights[testFile], isNotEmpty); |
782 } | 784 } |
783 } | 785 } |
OLD | NEW |