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

Side by Side Diff: pkg/analyzer/test/generated/resolver_test.dart

Issue 1532763002: Fixes to mock SDK to enable dart:core to be summarized. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Remove a bogus comment Created 5 years 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 unified diff | Download patch
OLDNEW
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/element/element.dart'; 9 import 'package:analyzer/dart/element/element.dart';
10 import 'package:analyzer/dart/element/type.dart'; 10 import 'package:analyzer/dart/element/type.dart';
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // 115 //
116 // dart:core 116 // dart:core
117 // 117 //
118 TestTypeProvider provider = new TestTypeProvider(); 118 TestTypeProvider provider = new TestTypeProvider();
119 CompilationUnitElementImpl coreUnit = 119 CompilationUnitElementImpl coreUnit =
120 new CompilationUnitElementImpl("core.dart"); 120 new CompilationUnitElementImpl("core.dart");
121 Source coreSource = sourceFactory.forUri(DartSdk.DART_CORE); 121 Source coreSource = sourceFactory.forUri(DartSdk.DART_CORE);
122 coreContext.setContents(coreSource, ""); 122 coreContext.setContents(coreSource, "");
123 coreUnit.librarySource = coreUnit.source = coreSource; 123 coreUnit.librarySource = coreUnit.source = coreSource;
124 ClassElementImpl proxyClassElement = ElementFactory.classElement2("_Proxy"); 124 ClassElementImpl proxyClassElement = ElementFactory.classElement2("_Proxy");
125 proxyClassElement.constructors = <ConstructorElement>[
126 ElementFactory.constructorElement(proxyClassElement, null, true)
127 ..isCycleFree = true
128 ];
125 ClassElement objectClassElement = provider.objectType.element; 129 ClassElement objectClassElement = provider.objectType.element;
126 coreUnit.types = <ClassElement>[ 130 coreUnit.types = <ClassElement>[
127 provider.boolType.element, 131 provider.boolType.element,
128 provider.deprecatedType.element, 132 provider.deprecatedType.element,
129 provider.doubleType.element, 133 provider.doubleType.element,
130 provider.functionType.element, 134 provider.functionType.element,
131 provider.intType.element, 135 provider.intType.element,
132 provider.iterableType.element, 136 provider.iterableType.element,
133 provider.iteratorType.element, 137 provider.iteratorType.element,
134 provider.listType.element, 138 provider.listType.element,
(...skipping 15976 matching lines...) Expand 10 before | Expand all | Expand 10 after
16111 16115
16112 void _resolveTestUnit(String code) { 16116 void _resolveTestUnit(String code) {
16113 testCode = code; 16117 testCode = code;
16114 testSource = addSource(testCode); 16118 testSource = addSource(testCode);
16115 LibraryElement library = resolve2(testSource); 16119 LibraryElement library = resolve2(testSource);
16116 assertNoErrors(testSource); 16120 assertNoErrors(testSource);
16117 verify([testSource]); 16121 verify([testSource]);
16118 testUnit = resolveCompilationUnit(testSource, library); 16122 testUnit = resolveCompilationUnit(testSource, library);
16119 } 16123 }
16120 } 16124 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/compile_time_error_code_test.dart ('k') | pkg/analyzer/test/src/summary/resynthesize_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698