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 17 matching lines...) Expand all Loading... |
28 import 'package:analyzer/task/model.dart'; | 28 import 'package:analyzer/task/model.dart'; |
29 import 'package:test/test.dart'; | 29 import 'package:test/test.dart'; |
30 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 30 import 'package:test_reflective_loader/test_reflective_loader.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 | 36 |
37 main() { | 37 main() { |
38 initializeTestEnvironment(); | |
39 defineReflectiveSuite(() { | 38 defineReflectiveSuite(() { |
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); |
47 defineReflectiveTests(BuildTypeProviderTaskTest); | 46 defineReflectiveTests(BuildTypeProviderTaskTest); |
48 defineReflectiveTests(ComputeConstantDependenciesTaskTest); | 47 defineReflectiveTests(ComputeConstantDependenciesTaskTest); |
(...skipping 5605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5654 /** | 5653 /** |
5655 * Fill [errorListener] with [result] errors in the current [task]. | 5654 * Fill [errorListener] with [result] errors in the current [task]. |
5656 */ | 5655 */ |
5657 void _fillErrorListener(ResultDescriptor<List<AnalysisError>> result) { | 5656 void _fillErrorListener(ResultDescriptor<List<AnalysisError>> result) { |
5658 List<AnalysisError> errors = task.outputs[result] as List<AnalysisError>; | 5657 List<AnalysisError> errors = task.outputs[result] as List<AnalysisError>; |
5659 expect(errors, isNotNull, reason: result.name); | 5658 expect(errors, isNotNull, reason: result.name); |
5660 errorListener = new GatheringErrorListener(); | 5659 errorListener = new GatheringErrorListener(); |
5661 errorListener.addAll(errors); | 5660 errorListener.addAll(errors); |
5662 } | 5661 } |
5663 } | 5662 } |
OLD | NEW |