| Index: pkg/analyzer/lib/src/generated/testing/element_factory.dart
|
| diff --git a/pkg/analyzer/lib/src/generated/testing/element_factory.dart b/pkg/analyzer/lib/src/generated/testing/element_factory.dart
|
| index 497990c91cd366320bc04c0cd58673c8aa18c400..a8d7fff3a88c58133e60222e7f47791610e5bb5a 100644
|
| --- a/pkg/analyzer/lib/src/generated/testing/element_factory.dart
|
| +++ b/pkg/analyzer/lib/src/generated/testing/element_factory.dart
|
| @@ -82,10 +82,15 @@ class ElementFactory {
|
| [List<String> parameterNames]) =>
|
| classTypeAlias(typeName, objectType, parameterNames);
|
|
|
| - static CompilationUnitElementImpl compilationUnit(String fileName) {
|
| + static CompilationUnitElementImpl compilationUnit(String fileName,
|
| + [Source librarySource]) {
|
| Source source = new NonExistingSource(fileName, UriKind.FILE_URI);
|
| CompilationUnitElementImpl unit = new CompilationUnitElementImpl(fileName);
|
| unit.source = source;
|
| + if (librarySource == null) {
|
| + librarySource = source;
|
| + }
|
| + unit.librarySource = librarySource;
|
| return unit;
|
| }
|
|
|
|
|