Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(765)

Unified Diff: pkg/analyzer/test/src/summary/resynthesize_ast_test.dart

Issue 2762863002: Issue 28580. Relax instantiate to bounds. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}
}

Powered by Google App Engine
This is Rietveld 408576698