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

Unified Diff: pkg/analyzer/test/generated/resolver_test.dart

Issue 2647833002: fix #28008, fix #28009 implement FutureOr<T> (Closed)
Patch Set: Merge remote-tracking branch 'origin/master' into 28008_futureort Created 3 years, 11 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/generated/resolver_test.dart
diff --git a/pkg/analyzer/test/generated/resolver_test.dart b/pkg/analyzer/test/generated/resolver_test.dart
index e201cf867d35d1ecbaa2ad86e193b6a38a121933..957d94ccb54f3ebef727b966ac21ebc993507cda 100644
--- a/pkg/analyzer/test/generated/resolver_test.dart
+++ b/pkg/analyzer/test/generated/resolver_test.dart
@@ -2425,6 +2425,7 @@ class TypeProviderImplTest extends EngineTestCase {
InterfaceType doubleType = _classElement("double", numType).type;
InterfaceType functionType = _classElement("Function", objectType).type;
InterfaceType futureType = _classElement("Future", objectType, ["T"]).type;
+ InterfaceType futureOrType = _classElement("FutureOr", objectType, ["T"]).type;
InterfaceType intType = _classElement("int", numType).type;
InterfaceType iterableType =
_classElement("Iterable", objectType, ["T"]).type;
@@ -2453,7 +2454,7 @@ class TypeProviderImplTest extends EngineTestCase {
];
CompilationUnitElementImpl asyncUnit =
new CompilationUnitElementImpl("async.dart");
- asyncUnit.types = <ClassElement>[futureType.element, streamType.element];
+ asyncUnit.types = <ClassElement>[futureType.element, futureOrType.element, streamType.element];
AnalysisContext context = AnalysisEngine.instance.createAnalysisContext();
LibraryElementImpl coreLibrary = new LibraryElementImpl.forNode(
context, AstTestFactory.libraryIdentifier2(["dart.core"]));
@@ -2471,6 +2472,7 @@ class TypeProviderImplTest extends EngineTestCase {
expect(provider.dynamicType, isNotNull);
expect(provider.functionType, same(functionType));
expect(provider.futureType, same(futureType));
+ expect(provider.futureOrType, same(futureOrType));
expect(provider.intType, same(intType));
expect(provider.listType, same(listType));
expect(provider.mapType, same(mapType));
« no previous file with comments | « pkg/analyzer/test/generated/analysis_context_factory.dart ('k') | pkg/analyzer/test/generated/strong_mode_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698