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

Side by Side Diff: tests/compiler/dart2js/mock_compiler.dart

Issue 10689038: Revert "First step towards having patch files for generic libraries." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 months 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 | Annotate | Revision Log
« no previous file with comments | « lib/compiler/implementation/source_map_builder.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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('mock_compiler'); 5 #library('mock_compiler');
6 6
7 #import("dart:uri"); 7 #import("dart:uri");
8 8
9 #import("../../../lib/compiler/implementation/elements/elements.dart"); 9 #import("../../../lib/compiler/implementation/elements/elements.dart");
10 #import("../../../lib/compiler/implementation/leg.dart"); 10 #import("../../../lib/compiler/implementation/leg.dart");
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 } 149 }
150 150
151 void scanBuiltinLibraries() { 151 void scanBuiltinLibraries() {
152 // Do nothing. The mock core library is already handled in the constructor. 152 // Do nothing. The mock core library is already handled in the constructor.
153 } 153 }
154 154
155 LibraryElement scanBuiltinLibrary(String name) { 155 LibraryElement scanBuiltinLibrary(String name) {
156 // Do nothing. The mock core library is already handled in the constructor. 156 // Do nothing. The mock core library is already handled in the constructor.
157 } 157 }
158 158
159 // The mock library doesn't need any patches.
160 Uri resolvePatchUri(String dartLibraryName) => null;
161
162 Script readScript(Uri uri, [ScriptTag node]) { 159 Script readScript(Uri uri, [ScriptTag node]) {
163 String code = sources[uri.toString()]; 160 String code = sources[uri.toString()];
164 if (code === null) throw new IllegalArgumentException(uri); 161 if (code === null) throw new IllegalArgumentException(uri);
165 return new StringScript(code); 162 return new StringScript(code);
166 } 163 }
167 } 164 }
168 165
169 void compareWarningKinds(String text, expectedWarnings, foundWarnings) { 166 void compareWarningKinds(String text, expectedWarnings, foundWarnings) {
170 var fail = (message) => Expect.fail('$text: $message'); 167 var fail = (message) => Expect.fail('$text: $message');
171 Iterator<MessageKind> expected = expectedWarnings.iterator(); 168 Iterator<MessageKind> expected = expectedWarnings.iterator();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 importLibrary(library, compiler.coreLibrary, compiler); 200 importLibrary(library, compiler.coreLibrary, compiler);
204 return library; 201 return library;
205 } 202 }
206 203
207 class StringScript extends Script { 204 class StringScript extends Script {
208 final String code; 205 final String code;
209 StringScript(this.code) : super(null, null); 206 StringScript(this.code) : super(null, null);
210 String get text() => code; 207 String get text() => code;
211 String get name() => "mock script"; 208 String get name() => "mock script";
212 } 209 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/source_map_builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698