| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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.resolver_test; | 5 library analyzer.test.generated.resolver_test; |
| 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'; |
| (...skipping 2902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2913 stackTraceType.element, | 2913 stackTraceType.element, |
| 2914 stringType.element, | 2914 stringType.element, |
| 2915 symbolType.element, | 2915 symbolType.element, |
| 2916 typeType.element | 2916 typeType.element |
| 2917 ]; | 2917 ]; |
| 2918 AnalysisContext context = AnalysisEngine.instance.createAnalysisContext(); | 2918 AnalysisContext context = AnalysisEngine.instance.createAnalysisContext(); |
| 2919 LibraryElementImpl coreLibrary = new LibraryElementImpl.forNode( | 2919 LibraryElementImpl coreLibrary = new LibraryElementImpl.forNode( |
| 2920 context, AstFactory.libraryIdentifier2(["dart.core"])); | 2920 context, AstFactory.libraryIdentifier2(["dart.core"])); |
| 2921 coreLibrary.definingCompilationUnit = coreUnit; | 2921 coreLibrary.definingCompilationUnit = coreUnit; |
| 2922 | 2922 |
| 2923 LibraryElementImpl mockAsyncLib = | 2923 Source asyncSource = new NonExistingSource( |
| 2924 (context as AnalysisContextImpl).createMockAsyncLib(coreLibrary); | 2924 'async.dart', Uri.parse('dart:async'), UriKind.DART_URI); |
| 2925 LibraryElementImpl mockAsyncLib = (context as AnalysisContextImpl) |
| 2926 .createMockAsyncLib(coreLibrary, asyncSource); |
| 2927 expect(mockAsyncLib.source, same(asyncSource)); |
| 2928 expect(mockAsyncLib.definingCompilationUnit.source, same(asyncSource)); |
| 2925 expect(mockAsyncLib.publicNamespace, isNotNull); | 2929 expect(mockAsyncLib.publicNamespace, isNotNull); |
| 2926 | 2930 |
| 2927 // | 2931 // |
| 2928 // Create a type provider and ensure that it can return the expected types. | 2932 // Create a type provider and ensure that it can return the expected types. |
| 2929 // | 2933 // |
| 2930 TypeProviderImpl provider = new TypeProviderImpl(coreLibrary, mockAsyncLib); | 2934 TypeProviderImpl provider = new TypeProviderImpl(coreLibrary, mockAsyncLib); |
| 2931 expect(provider.boolType, same(boolType)); | 2935 expect(provider.boolType, same(boolType)); |
| 2932 expect(provider.bottomType, isNotNull); | 2936 expect(provider.bottomType, isNotNull); |
| 2933 expect(provider.doubleType, same(doubleType)); | 2937 expect(provider.doubleType, same(doubleType)); |
| 2934 expect(provider.dynamicType, isNotNull); | 2938 expect(provider.dynamicType, isNotNull); |
| (...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3627 */ | 3631 */ |
| 3628 class _StaleElement extends ElementImpl { | 3632 class _StaleElement extends ElementImpl { |
| 3629 _StaleElement() : super("_StaleElement", -1); | 3633 _StaleElement() : super("_StaleElement", -1); |
| 3630 | 3634 |
| 3631 @override | 3635 @override |
| 3632 get kind => throw "_StaleElement's kind shouldn't be accessed"; | 3636 get kind => throw "_StaleElement's kind shouldn't be accessed"; |
| 3633 | 3637 |
| 3634 @override | 3638 @override |
| 3635 accept(_) => throw "_StaleElement shouldn't be visited"; | 3639 accept(_) => throw "_StaleElement shouldn't be visited"; |
| 3636 } | 3640 } |
| OLD | NEW |