| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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.summary.resynthesize_ast_test; | 5 library analyzer.test.src.summary.resynthesize_ast_test; |
| 6 | 6 |
| 7 import 'package:analyzer/dart/ast/ast.dart'; | 7 import 'package:analyzer/dart/ast/ast.dart'; |
| 8 import 'package:analyzer/dart/element/element.dart'; | 8 import 'package:analyzer/dart/element/element.dart'; |
| 9 import 'package:analyzer/src/dart/element/element.dart'; | 9 import 'package:analyzer/src/dart/element/element.dart'; |
| 10 import 'package:analyzer/src/generated/engine.dart' | 10 import 'package:analyzer/src/generated/engine.dart' |
| 11 show AnalysisContext, AnalysisOptionsImpl; | 11 show AnalysisContext, AnalysisOptionsImpl; |
| 12 import 'package:analyzer/src/generated/sdk.dart'; | 12 import 'package:analyzer/src/generated/sdk.dart'; |
| 13 import 'package:analyzer/src/generated/source.dart'; | 13 import 'package:analyzer/src/generated/source.dart'; |
| 14 import 'package:analyzer/src/summary/format.dart'; | 14 import 'package:analyzer/src/summary/format.dart'; |
| 15 import 'package:analyzer/src/summary/idl.dart'; | 15 import 'package:analyzer/src/summary/idl.dart'; |
| 16 import 'package:analyzer/src/summary/link.dart'; | 16 import 'package:analyzer/src/summary/link.dart'; |
| 17 import 'package:analyzer/src/summary/prelink.dart'; | 17 import 'package:analyzer/src/summary/prelink.dart'; |
| 18 import 'package:analyzer/src/summary/resynthesize.dart'; | 18 import 'package:analyzer/src/summary/resynthesize.dart'; |
| 19 import 'package:analyzer/src/summary/summarize_ast.dart'; | 19 import 'package:analyzer/src/summary/summarize_ast.dart'; |
| 20 import 'package:analyzer/src/summary/summarize_elements.dart' | 20 import 'package:analyzer/src/summary/summarize_elements.dart' |
| 21 show PackageBundleAssembler; | 21 show PackageBundleAssembler; |
| 22 import 'package:analyzer/task/dart.dart' show PARSED_UNIT; | 22 import 'package:analyzer/task/dart.dart' show PARSED_UNIT; |
| 23 import 'package:analyzer/task/general.dart'; | 23 import 'package:analyzer/task/general.dart'; |
| 24 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
| 24 import 'package:unittest/unittest.dart'; | 25 import 'package:unittest/unittest.dart'; |
| 25 | 26 |
| 26 import '../../reflective_tests.dart'; | |
| 27 import '../context/abstract_context.dart'; | 27 import '../context/abstract_context.dart'; |
| 28 import '../task/strong/inferred_type_test.dart'; | 28 import '../task/strong/inferred_type_test.dart'; |
| 29 import 'resynthesize_test.dart'; | 29 import 'resynthesize_test.dart'; |
| 30 import 'summary_common.dart'; | 30 import 'summary_common.dart'; |
| 31 | 31 |
| 32 main() { | 32 main() { |
| 33 groupSep = ' | '; | 33 groupSep = ' | '; |
| 34 runReflectiveTests(ResynthesizeAstTest); | 34 defineReflectiveTests(ResynthesizeAstTest); |
| 35 runReflectiveTests(AstInferredTypeTest); | 35 defineReflectiveTests(AstInferredTypeTest); |
| 36 } | 36 } |
| 37 | 37 |
| 38 @reflectiveTest | 38 @reflectiveTest |
| 39 class AstInferredTypeTest extends AbstractResynthesizeTest | 39 class AstInferredTypeTest extends AbstractResynthesizeTest |
| 40 with _AstResynthesizeTestMixin, InferredTypeMixin { | 40 with _AstResynthesizeTestMixin, InferredTypeMixin { |
| 41 bool get checkPropagatedTypes { | 41 bool get checkPropagatedTypes { |
| 42 // AST-based summaries do not yet handle propagated types. | 42 // AST-based summaries do not yet handle propagated types. |
| 43 // TODO(paulberry): fix this. | 43 // TODO(paulberry): fix this. |
| 44 return false; | 44 return false; |
| 45 } | 45 } |
| (...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 858 * directly, because then it would be overriding a field at the site where the | 858 * directly, because then it would be overriding a field at the site where the |
| 859 * mixin is instantiated. | 859 * mixin is instantiated. |
| 860 */ | 860 */ |
| 861 abstract class _AstResynthesizeTestMixinInterface { | 861 abstract class _AstResynthesizeTestMixinInterface { |
| 862 /** | 862 /** |
| 863 * A test should return `true` to indicate that a missing file at the time of | 863 * A test should return `true` to indicate that a missing file at the time of |
| 864 * summary resynthesis shouldn't trigger an error. | 864 * summary resynthesis shouldn't trigger an error. |
| 865 */ | 865 */ |
| 866 bool get allowMissingFiles; | 866 bool get allowMissingFiles; |
| 867 } | 867 } |
| OLD | NEW |