Index: pkg/analyzer/test/src/summary/resynthesize_ast_test.dart |
diff --git a/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart b/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart |
index e0f166d7e90d513c2f0a5df046c179d8ca22eb6a..c6ec856c8105a4960bbc7c4df1fd4ab9d7557326 100644 |
--- a/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart |
+++ b/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart |
@@ -26,12 +26,13 @@ import 'package:unittest/unittest.dart'; |
import '../context/abstract_context.dart'; |
import '../task/strong/inferred_type_test.dart'; |
-import 'resynthesize_test.dart'; |
+import 'resynthesize_common.dart'; |
import 'summary_common.dart'; |
main() { |
groupSep = ' | '; |
- defineReflectiveTests(ResynthesizeAstTest); |
+ defineReflectiveTests(ResynthesizeAstSpecTest); |
+ defineReflectiveTests(ResynthesizeAstStrongTest); |
defineReflectiveTests(AstInferredTypeTest); |
} |
@@ -683,27 +684,65 @@ var v = new C().m(1, b: 'bbb', c: 2.0); |
} |
@reflectiveTest |
-class ResynthesizeAstTest extends ResynthesizeTest |
- with _AstResynthesizeTestMixin { |
+class ResynthesizeAstSpecTest extends _ResynthesizeAstTest { |
@override |
- bool get checkPropagatedTypes => false; |
+ AnalysisOptionsImpl createOptions() => |
+ super.createOptions()..strongMode = false; |
+} |
+@reflectiveTest |
+class ResynthesizeAstStrongTest extends _ResynthesizeAstTest { |
@override |
- LibraryElementImpl checkLibrary(String text, |
- {bool allowErrors: false, bool dumpSummaries: false}) { |
- Source source = addTestSource(text); |
- LibraryElementImpl resynthesized = _encodeDecodeLibraryElement(source); |
- LibraryElementImpl original = context.computeLibraryElement(source); |
- checkLibraryElements(original, resynthesized); |
- return resynthesized; |
+ AnalysisOptionsImpl createOptions() => |
+ super.createOptions()..strongMode = true; |
+ |
+ @override |
+ @failingTest |
+ test_const_invokeConstructor_named_unresolved() { |
+ super.test_const_invokeConstructor_named_unresolved(); |
} |
@override |
- DartSdk createDartSdk() => AbstractContextTest.SHARED_MOCK_SDK; |
+ @failingTest |
+ test_const_invokeConstructor_named_unresolved3() { |
+ super.test_const_invokeConstructor_named_unresolved3(); |
+ } |
@override |
- TestSummaryResynthesizer encodeDecodeLibrarySource(Source source) { |
- return _encodeLibrary(source); |
+ @failingTest |
+ test_instantiateToBounds_boundRefersToLaterTypeArgument() { |
+ // TODO(paulberry): this is failing due to dartbug.com/27072. |
+ super.test_instantiateToBounds_boundRefersToLaterTypeArgument(); |
+ } |
+ |
+ @override |
+ @failingTest |
+ test_syntheticFunctionType_genericClosure() { |
+ super.test_syntheticFunctionType_genericClosure(); |
+ } |
+ |
+ @override |
+ @failingTest |
+ test_syntheticFunctionType_inGenericClass() { |
+ super.test_syntheticFunctionType_inGenericClass(); |
+ } |
+ |
+ @override |
+ @failingTest |
+ test_syntheticFunctionType_noArguments() { |
+ super.test_syntheticFunctionType_noArguments(); |
+ } |
+ |
+ @override |
+ @failingTest |
+ test_syntheticFunctionType_withArguments() { |
+ super.test_syntheticFunctionType_withArguments(); |
+ } |
+ |
+ @override |
+ @failingTest |
+ test_unused_type_parameter() { |
+ super.test_unused_type_parameter(); |
} |
} |
@@ -863,3 +902,34 @@ abstract class _AstResynthesizeTestMixinInterface { |
*/ |
bool get allowMissingFiles; |
} |
+ |
+abstract class _ResynthesizeAstTest extends ResynthesizeTest |
+ with _AstResynthesizeTestMixin { |
+ @override |
+ bool get checkPropagatedTypes => false; |
+ |
+ @override |
+ LibraryElementImpl checkLibrary(String text, |
+ {bool allowErrors: false, bool dumpSummaries: false}) { |
+ Source source = addTestSource(text); |
+ LibraryElementImpl resynthesized = _encodeDecodeLibraryElement(source); |
+ LibraryElementImpl original = context.computeLibraryElement(source); |
+ checkLibraryElements(original, resynthesized); |
+ return resynthesized; |
+ } |
+ |
+ @override |
+ void compareLocalElementsOfExecutable(ExecutableElement resynthesized, |
+ ExecutableElement original, String desc) { |
+ // We don't resynthesize local elements during link. |
+ // So, we should not compare them. |
+ } |
+ |
+ @override |
+ DartSdk createDartSdk() => AbstractContextTest.SHARED_MOCK_SDK; |
+ |
+ @override |
+ TestSummaryResynthesizer encodeDecodeLibrarySource(Source source) { |
+ return _encodeLibrary(source); |
+ } |
+} |