| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library analyzer.test.generated.analysis_context_factory; | 5 library analyzer.test.generated.analysis_context_factory; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/ast/token.dart'; | 10 import 'package:analyzer/dart/ast/token.dart'; |
| 11 import 'package:analyzer/dart/element/element.dart'; | 11 import 'package:analyzer/dart/element/element.dart'; |
| 12 import 'package:analyzer/dart/element/type.dart'; | 12 import 'package:analyzer/dart/element/type.dart'; |
| 13 import 'package:analyzer/file_system/file_system.dart'; | 13 import 'package:analyzer/file_system/file_system.dart'; |
| 14 import 'package:analyzer/file_system/memory_file_system.dart'; | 14 import 'package:analyzer/file_system/memory_file_system.dart'; |
| 15 import 'package:analyzer/file_system/physical_file_system.dart'; | 15 import 'package:analyzer/file_system/physical_file_system.dart'; |
| 16 import 'package:analyzer/src/context/context.dart'; | 16 import 'package:analyzer/src/context/context.dart'; |
| 17 import 'package:analyzer/src/dart/element/element.dart'; | 17 import 'package:analyzer/src/dart/element/element.dart'; |
| 18 import 'package:analyzer/src/dart/element/type.dart'; | 18 import 'package:analyzer/src/dart/element/type.dart'; |
| 19 import 'package:analyzer/src/dart/sdk/sdk.dart'; | 19 import 'package:analyzer/src/dart/sdk/sdk.dart'; |
| 20 import 'package:analyzer/src/generated/engine.dart'; | 20 import 'package:analyzer/src/generated/engine.dart'; |
| 21 import 'package:analyzer/src/generated/resolver.dart'; | 21 import 'package:analyzer/src/generated/resolver.dart'; |
| 22 import 'package:analyzer/src/generated/sdk.dart'; | 22 import 'package:analyzer/src/generated/sdk.dart'; |
| 23 import 'package:analyzer/src/generated/source_io.dart'; | 23 import 'package:analyzer/src/generated/source_io.dart'; |
| 24 import 'package:analyzer/src/generated/testing/ast_factory.dart'; | 24 import 'package:analyzer/src/generated/testing/ast_factory.dart'; |
| 25 import 'package:analyzer/src/generated/testing/element_factory.dart'; | 25 import 'package:analyzer/src/generated/testing/element_factory.dart'; |
| 26 import 'package:analyzer/src/generated/testing/test_type_provider.dart'; | 26 import 'package:analyzer/src/generated/testing/test_type_provider.dart'; |
| 27 import 'package:analyzer/src/generated/utilities_dart.dart'; | 27 import 'package:analyzer/src/generated/utilities_dart.dart'; |
| 28 import 'package:analyzer/src/source/source_resource.dart'; | 28 import 'package:analyzer/src/source/source_resource.dart'; |
| 29 import 'package:analyzer/src/string_source.dart'; | 29 import 'package:analyzer/src/string_source.dart'; |
| 30 import 'package:unittest/unittest.dart'; | 30 import 'package:test/test.dart'; |
| 31 | 31 |
| 32 /** | 32 /** |
| 33 * The class `AnalysisContextFactory` defines utility methods used to create ana
lysis contexts | 33 * The class `AnalysisContextFactory` defines utility methods used to create ana
lysis contexts |
| 34 * for testing purposes. | 34 * for testing purposes. |
| 35 */ | 35 */ |
| 36 class AnalysisContextFactory { | 36 class AnalysisContextFactory { |
| 37 static String _DART_MATH = "dart:math"; | 37 static String _DART_MATH = "dart:math"; |
| 38 | 38 |
| 39 static String _DART_INTERCEPTORS = "dart:_interceptors"; | 39 static String _DART_INTERCEPTORS = "dart:_interceptors"; |
| 40 | 40 |
| (...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 | 573 |
| 574 void _addLibrary(LibraryMap map, String uri, bool isInternal, String path) { | 574 void _addLibrary(LibraryMap map, String uri, bool isInternal, String path) { |
| 575 SdkLibraryImpl library = new SdkLibraryImpl(uri); | 575 SdkLibraryImpl library = new SdkLibraryImpl(uri); |
| 576 if (isInternal) { | 576 if (isInternal) { |
| 577 library.category = "Internal"; | 577 library.category = "Internal"; |
| 578 } | 578 } |
| 579 library.path = path; | 579 library.path = path; |
| 580 map.setLibrary(uri, library); | 580 map.setLibrary(uri, library); |
| 581 } | 581 } |
| 582 } | 582 } |
| OLD | NEW |