Index: pkg/analyzer/test/src/task/dart_test.dart |
diff --git a/pkg/analyzer/test/src/task/dart_test.dart b/pkg/analyzer/test/src/task/dart_test.dart |
index 2a9fca8309b6a3ba13300eb33bfca39d6518b2f5..9ebd8b9947864a074a7a26847b5429e189f51e1f 100644 |
--- a/pkg/analyzer/test/src/task/dart_test.dart |
+++ b/pkg/analyzer/test/src/task/dart_test.dart |
@@ -12,6 +12,7 @@ import 'package:analyzer/src/generated/engine.dart' |
show AnalysisOptionsImpl, CacheState; |
import 'package:analyzer/src/generated/error.dart'; |
import 'package:analyzer/src/generated/resolver.dart'; |
+import 'package:analyzer/src/generated/sdk.dart'; |
import 'package:analyzer/src/generated/source.dart'; |
import 'package:analyzer/src/task/dart.dart'; |
import 'package:analyzer/task/dart.dart'; |
@@ -399,6 +400,22 @@ library libB; |
} |
} |
+ test_perform_dartCoreContext() { |
+ List<Source> sources = newSources({'/libA.dart': ''}); |
+ Source source = sources[0]; |
+ // perform task |
+ _computeResult(source, LIBRARY_ELEMENT2); |
+ expect(task, new isInstanceOf<BuildDirectiveElementsTask>()); |
+ // prepare outputs |
+ LibraryElement libraryElement = outputs[LIBRARY_ELEMENT2]; |
+ // verify that dart:core has SDK context |
+ { |
+ LibraryElement coreLibrary = libraryElement.importedLibraries[0]; |
+ DartSdk dartSdk = context.sourceFactory.dartSdk; |
+ expect(coreLibrary.context, same(dartSdk.context)); |
+ } |
+ } |
+ |
test_perform_error_exportOfNonLibrary() { |
List<Source> sources = newSources({ |
'/libA.dart': ''' |