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

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

Issue 11879039: Fix error message for library name mismatch. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 7 years, 11 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
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:collection'; 7 import 'dart:collection';
8 import 'dart:uri'; 8 import 'dart:uri';
9 9
10 import '../../../sdk/lib/_internal/compiler/compiler.dart' as api; 10 import '../../../sdk/lib/_internal/compiler/compiler.dart' as api;
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 void importCoreLibrary(LibraryElement library) { 265 void importCoreLibrary(LibraryElement library) {
266 scanner.importLibrary(library, coreLibrary, null); 266 scanner.importLibrary(library, coreLibrary, null);
267 } 267 }
268 268
269 Uri translateResolvedUri(LibraryElement importingLibrary, 269 Uri translateResolvedUri(LibraryElement importingLibrary,
270 Uri resolvedUri, Node node) => resolvedUri; 270 Uri resolvedUri, Node node) => resolvedUri;
271 271
272 // The mock library doesn't need any patches. 272 // The mock library doesn't need any patches.
273 Uri resolvePatchUri(String dartLibraryName) => null; 273 Uri resolvePatchUri(String dartLibraryName) => null;
274 274
275 Script readScript(Uri uri, [ScriptTag node]) { 275 Script readScript(Uri uri, [Node node]) {
276 SourceFile sourceFile = sourceFiles[uri.toString()]; 276 SourceFile sourceFile = sourceFiles[uri.toString()];
277 if (sourceFile == null) throw new ArgumentError(uri); 277 if (sourceFile == null) throw new ArgumentError(uri);
278 return new Script(uri, sourceFile); 278 return new Script(uri, sourceFile);
279 } 279 }
280 280
281 Element lookupElementIn(ScopeContainerElement container, name) { 281 Element lookupElementIn(ScopeContainerElement container, name) {
282 Element element = container.localLookup(name); 282 Element element = container.localLookup(name);
283 return element != null 283 return element != null
284 ? element 284 ? element
285 : new ErroneousElementX(null, null, name, container); 285 : new ErroneousElementX(null, null, name, container);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 operator []=(Node node, Element element) { 333 operator []=(Node node, Element element) {
334 map[node] = element; 334 map[node] = element;
335 } 335 }
336 336
337 operator [](Node node) => map[node]; 337 operator [](Node node) => map[node];
338 338
339 void remove(Node node) { 339 void remove(Node node) {
340 map.remove(node); 340 map.remove(node);
341 } 341 }
342 } 342 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/elements/modelx.dart ('k') | tests/compiler/dart2js/part_of_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698