OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 analyzer.test.src.task.dart_test; | 5 library analyzer.test.src.task.dart_test; |
6 | 6 |
7 import 'package:analyzer/dart/ast/ast.dart'; | 7 import 'package:analyzer/dart/ast/ast.dart'; |
8 import 'package:analyzer/dart/ast/token.dart'; | 8 import 'package:analyzer/dart/ast/token.dart'; |
9 import 'package:analyzer/dart/ast/visitor.dart'; | 9 import 'package:analyzer/dart/ast/visitor.dart'; |
10 import 'package:analyzer/dart/element/element.dart'; | 10 import 'package:analyzer/dart/element/element.dart'; |
(...skipping 15 matching lines...) Expand all Loading... |
26 import 'package:analyzer/task/dart.dart'; | 26 import 'package:analyzer/task/dart.dart'; |
27 import 'package:analyzer/task/general.dart'; | 27 import 'package:analyzer/task/general.dart'; |
28 import 'package:analyzer/task/model.dart'; | 28 import 'package:analyzer/task/model.dart'; |
29 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 29 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
30 import 'package:unittest/unittest.dart'; | 30 import 'package:unittest/unittest.dart'; |
31 | 31 |
32 import '../../generated/resolver_test_case.dart'; | 32 import '../../generated/resolver_test_case.dart'; |
33 import '../../generated/test_support.dart'; | 33 import '../../generated/test_support.dart'; |
34 import '../../utils.dart'; | 34 import '../../utils.dart'; |
35 import '../context/abstract_context.dart'; | 35 import '../context/abstract_context.dart'; |
36 import '../context/mock_sdk.dart'; | |
37 | 36 |
38 main() { | 37 main() { |
39 initializeTestEnvironment(); | 38 initializeTestEnvironment(); |
40 defineReflectiveTests(BuildCompilationUnitElementTaskTest); | 39 defineReflectiveTests(BuildCompilationUnitElementTaskTest); |
41 defineReflectiveTests(BuildDirectiveElementsTaskTest); | 40 defineReflectiveTests(BuildDirectiveElementsTaskTest); |
42 defineReflectiveTests(BuildEnumMemberElementsTaskTest); | 41 defineReflectiveTests(BuildEnumMemberElementsTaskTest); |
43 defineReflectiveTests(BuildExportNamespaceTaskTest); | 42 defineReflectiveTests(BuildExportNamespaceTaskTest); |
44 defineReflectiveTests(BuildLibraryElementTaskTest); | 43 defineReflectiveTests(BuildLibraryElementTaskTest); |
45 defineReflectiveTests(BuildPublicNamespaceTaskTest); | 44 defineReflectiveTests(BuildPublicNamespaceTaskTest); |
46 defineReflectiveTests(BuildSourceExportClosureTaskTest); | 45 defineReflectiveTests(BuildSourceExportClosureTaskTest); |
(...skipping 5606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5653 /** | 5652 /** |
5654 * Fill [errorListener] with [result] errors in the current [task]. | 5653 * Fill [errorListener] with [result] errors in the current [task]. |
5655 */ | 5654 */ |
5656 void _fillErrorListener(ResultDescriptor<List<AnalysisError>> result) { | 5655 void _fillErrorListener(ResultDescriptor<List<AnalysisError>> result) { |
5657 List<AnalysisError> errors = task.outputs[result] as List<AnalysisError>; | 5656 List<AnalysisError> errors = task.outputs[result] as List<AnalysisError>; |
5658 expect(errors, isNotNull, reason: result.name); | 5657 expect(errors, isNotNull, reason: result.name); |
5659 errorListener = new GatheringErrorListener(); | 5658 errorListener = new GatheringErrorListener(); |
5660 errorListener.addAll(errors); | 5659 errorListener.addAll(errors); |
5661 } | 5660 } |
5662 } | 5661 } |
OLD | NEW |