| 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'; |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 return outOfRangeTest(new SourceEdit(-1, 3, 'foo')); | 345 return outOfRangeTest(new SourceEdit(-1, 3, 'foo')); |
| 346 }); | 346 }); |
| 347 | 347 |
| 348 test('beyond end', () { | 348 test('beyond end', () { |
| 349 return outOfRangeTest(new SourceEdit(6, 6, 'foo')); | 349 return outOfRangeTest(new SourceEdit(6, 6, 'foo')); |
| 350 }); | 350 }); |
| 351 }); | 351 }); |
| 352 } | 352 } |
| 353 | 353 |
| 354 | 354 |
| 355 @ReflectiveTestCase() | 355 @reflectiveTest |
| 356 class AnalysisDomainTest extends AbstractAnalysisTest { | 356 class AnalysisDomainTest extends AbstractAnalysisTest { |
| 357 Map<String, List<AnalysisError>> filesErrors = {}; | 357 Map<String, List<AnalysisError>> filesErrors = {}; |
| 358 | 358 |
| 359 void processNotification(Notification notification) { | 359 void processNotification(Notification notification) { |
| 360 if (notification.event == ANALYSIS_ERRORS) { | 360 if (notification.event == ANALYSIS_ERRORS) { |
| 361 var decoded = new AnalysisErrorsParams.fromNotification(notification); | 361 var decoded = new AnalysisErrorsParams.fromNotification(notification); |
| 362 filesErrors[decoded.file] = decoded.errors; | 362 filesErrors[decoded.file] = decoded.errors; |
| 363 } | 363 } |
| 364 } | 364 } |
| 365 | 365 |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 626 return waitForServerOperationsPerformed(server); | 626 return waitForServerOperationsPerformed(server); |
| 627 } | 627 } |
| 628 | 628 |
| 629 static String _getCodeString(code) { | 629 static String _getCodeString(code) { |
| 630 if (code is List<String>) { | 630 if (code is List<String>) { |
| 631 code = code.join('\n'); | 631 code = code.join('\n'); |
| 632 } | 632 } |
| 633 return code as String; | 633 return code as String; |
| 634 } | 634 } |
| 635 } | 635 } |
| OLD | NEW |