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 4fde69aa1d6d524f7f94f5cbeb6ea0a04a46d083..932b7bea64cb545b0fbbaccbc105a6475bd04124 100644 |
--- a/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart |
+++ b/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart |
@@ -58,6 +58,8 @@ class AstInferredTypeTest extends AbstractResynthesizeTest |
@override |
bool get mayCheckTypesOfLocals => false; |
+ bool shouldCompareElementsWithAnalysisContext = true; |
+ |
@override |
void addFile(String content, {String name: '/main.dart'}) { |
addLibrarySource(name, content); |
@@ -157,6 +159,11 @@ class AstInferredTypeTest extends AbstractResynthesizeTest |
@override |
@failingTest |
+ test_blockBodiedLambdas_noReturn_topLevel() => |
+ super.test_blockBodiedLambdas_noReturn_topLevel(); |
+ |
+ @override |
+ @failingTest |
test_blockBodiedLambdas_syncStar_topLevel() async { |
await super.test_blockBodiedLambdas_syncStar_topLevel(); |
} |
@@ -167,21 +174,6 @@ class AstInferredTypeTest extends AbstractResynthesizeTest |
await super.test_circularReference_viaClosures_initializerTypes(); |
} |
- @override |
- @failingTest |
- test_blockBodiedLambdas_noReturn_topLevel() => |
- super.test_blockBodiedLambdas_noReturn_topLevel(); |
- |
- @failingTest |
- @override |
- test_listLiteralsCanInferNull_topLevel() => |
- super.test_listLiteralsCanInferNull_topLevel(); |
- |
- @failingTest |
- @override |
- test_mapLiteralsCanInferNull_topLevel() => |
- super.test_mapLiteralsCanInferNull_topLevel(); |
- |
test_infer_extractIndex_custom() async { |
var unit = await checkFileElement(''' |
class A { |
@@ -541,6 +533,12 @@ var b = a.m(); |
await super.test_inferredType_blockClosure_noArgs_noReturn(); |
} |
+ @override |
+ test_instantiateToBounds_typeName_OK_hasBound_definedAfter() async { |
+ shouldCompareElementsWithAnalysisContext = false; |
+ await super.test_instantiateToBounds_typeName_OK_hasBound_definedAfter(); |
+ } |
+ |
test_invokeMethod_notGeneric_genericClass() async { |
var unit = await checkFileElement(r''' |
class C<T> { |
@@ -561,6 +559,16 @@ var v = new C().m(1, b: 'bbb', c: 2.0); |
expect(unit.topLevelVariables[0].type.toString(), 'int'); |
} |
+ @failingTest |
+ @override |
+ test_listLiteralsCanInferNull_topLevel() => |
+ super.test_listLiteralsCanInferNull_topLevel(); |
+ |
+ @failingTest |
+ @override |
+ test_mapLiteralsCanInferNull_topLevel() => |
+ super.test_mapLiteralsCanInferNull_topLevel(); |
+ |
@override |
@failingTest |
test_nullCoalescingOperator() async { |
@@ -673,8 +681,10 @@ var v = new C().m(1, b: 'bbb', c: 2.0); |
SummaryResynthesizer resynthesizer, Source source) { |
LibraryElementImpl resynthesized = |
resynthesizer.getLibraryElement(source.uri.toString()); |
- LibraryElementImpl original = context.computeLibraryElement(source); |
- checkLibraryElements(original, resynthesized); |
+ if (shouldCompareElementsWithAnalysisContext) { |
+ LibraryElementImpl original = context.computeLibraryElement(source); |
+ checkLibraryElements(original, resynthesized); |
+ } |
return resynthesized; |
} |
} |