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/src/analysis_server.dart'; | 9 import 'package:analysis_server/src/analysis_server.dart'; |
10 import 'package:analysis_server/src/constants.dart'; | 10 import 'package:analysis_server/src/constants.dart'; |
11 import 'package:analysis_server/src/domain_analysis.dart'; | 11 import 'package:analysis_server/src/domain_analysis.dart'; |
12 import 'package:analysis_server/src/protocol.dart'; | 12 import 'package:analysis_server/src/protocol.dart'; |
13 import 'package:analyzer/file_system/memory_file_system.dart'; | 13 import 'package:analyzer/file_system/memory_file_system.dart'; |
14 import 'package:analyzer/instrumentation/instrumentation.dart'; | 14 import 'package:analyzer/instrumentation/instrumentation.dart'; |
15 import 'package:path/path.dart'; | 15 import 'package:path/path.dart'; |
| 16 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
16 import 'package:unittest/unittest.dart'; | 17 import 'package:unittest/unittest.dart'; |
17 | 18 |
18 import 'analysis_abstract.dart'; | 19 import 'analysis_abstract.dart'; |
19 import 'mock_sdk.dart'; | 20 import 'mock_sdk.dart'; |
20 import 'mocks.dart'; | 21 import 'mocks.dart'; |
21 import 'reflective_tests.dart'; | |
22 | 22 |
23 main() { | 23 main() { |
24 groupSep = ' | '; | 24 groupSep = ' | '; |
25 | 25 |
26 runReflectiveTests(AnalysisDomainTest); | 26 defineReflectiveTests(AnalysisDomainTest); |
27 runReflectiveTests(SetSubscriptionsTest); | 27 defineReflectiveTests(SetSubscriptionsTest); |
28 | 28 |
29 MockServerChannel serverChannel; | 29 MockServerChannel serverChannel; |
30 MemoryResourceProvider resourceProvider; | 30 MemoryResourceProvider resourceProvider; |
31 AnalysisServer server; | 31 AnalysisServer server; |
32 AnalysisDomainHandler handler; | 32 AnalysisDomainHandler handler; |
33 | 33 |
34 setUp(() { | 34 setUp(() { |
35 serverChannel = new MockServerChannel(); | 35 serverChannel = new MockServerChannel(); |
36 resourceProvider = new MemoryResourceProvider(); | 36 resourceProvider = new MemoryResourceProvider(); |
37 server = new AnalysisServer(serverChannel, resourceProvider, | 37 server = new AnalysisServer(serverChannel, resourceProvider, |
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
687 test_beforeAnalysis() async { | 687 test_beforeAnalysis() async { |
688 addTestFile('int V = 42;'); | 688 addTestFile('int V = 42;'); |
689 createProject(); | 689 createProject(); |
690 // subscribe | 690 // subscribe |
691 addAnalysisSubscription(AnalysisService.HIGHLIGHTS, testFile); | 691 addAnalysisSubscription(AnalysisService.HIGHLIGHTS, testFile); |
692 // wait for analysis | 692 // wait for analysis |
693 await waitForTasksFinished(); | 693 await waitForTasksFinished(); |
694 expect(filesHighlights[testFile], isNotEmpty); | 694 expect(filesHighlights[testFile], isNotEmpty); |
695 } | 695 } |
696 } | 696 } |
OLD | NEW |