| 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 import 'dart:async'; | 5 import 'dart:async'; |
| 6 | 6 |
| 7 import 'package:analysis_server/protocol/protocol.dart'; | 7 import 'package:analysis_server/protocol/protocol.dart'; |
| 8 import 'package:analysis_server/protocol/protocol_generated.dart'; | 8 import 'package:analysis_server/protocol/protocol_generated.dart'; |
| 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'; |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 class AnalysisDomainTest extends AbstractAnalysisTest { | 386 class AnalysisDomainTest extends AbstractAnalysisTest { |
| 387 Map<String, List<AnalysisError>> filesErrors = {}; | 387 Map<String, List<AnalysisError>> filesErrors = {}; |
| 388 | 388 |
| 389 void processNotification(Notification notification) { | 389 void processNotification(Notification notification) { |
| 390 if (notification.event == ANALYSIS_ERRORS) { | 390 if (notification.event == ANALYSIS_ERRORS) { |
| 391 var decoded = new AnalysisErrorsParams.fromNotification(notification); | 391 var decoded = new AnalysisErrorsParams.fromNotification(notification); |
| 392 filesErrors[decoded.file] = decoded.errors; | 392 filesErrors[decoded.file] = decoded.errors; |
| 393 } | 393 } |
| 394 } | 394 } |
| 395 | 395 |
| 396 @override |
| 397 void setUp() { |
| 398 enableNewAnalysisDriver = true; |
| 399 super.setUp(); |
| 400 } |
| 401 |
| 396 test_setRoots_packages() { | 402 test_setRoots_packages() { |
| 397 // prepare package | 403 // prepare package |
| 398 String pkgFile = '/packages/pkgA/libA.dart'; | 404 String pkgFile = '/packages/pkgA/libA.dart'; |
| 399 resourceProvider.newFile( | 405 resourceProvider.newFile( |
| 400 pkgFile, | 406 pkgFile, |
| 401 ''' | 407 ''' |
| 402 library lib_a; | 408 library lib_a; |
| 403 class A {} | 409 class A {} |
| 404 '''); | 410 '''); |
| 405 resourceProvider.newFile( | 411 resourceProvider.newFile( |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 809 plugin.AnalysisSetSubscriptionsParams params = | 815 plugin.AnalysisSetSubscriptionsParams params = |
| 810 pluginManager.analysisSetSubscriptionsParams; | 816 pluginManager.analysisSetSubscriptionsParams; |
| 811 expect(params, isNotNull); | 817 expect(params, isNotNull); |
| 812 Map<plugin.AnalysisService, List<String>> subscriptions = | 818 Map<plugin.AnalysisService, List<String>> subscriptions = |
| 813 params.subscriptions; | 819 params.subscriptions; |
| 814 expect(subscriptions, hasLength(1)); | 820 expect(subscriptions, hasLength(1)); |
| 815 List<String> files = subscriptions[plugin.AnalysisService.HIGHLIGHTS]; | 821 List<String> files = subscriptions[plugin.AnalysisService.HIGHLIGHTS]; |
| 816 expect(files, [testFile]); | 822 expect(files, [testFile]); |
| 817 } | 823 } |
| 818 } | 824 } |
| OLD | NEW |