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

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

Issue 206193002: Remove cancel and make crash exit with code 253. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 9 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 | « tests/compiler/dart2js/exit_code_test.dart ('k') | tests/compiler/dart2js/parser_helper.dart » ('j') | 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 "package:expect/expect.dart"; 7 import "package:expect/expect.dart";
8 import 'dart:async'; 8 import 'dart:async';
9 import 'dart:collection'; 9 import 'dart:collection';
10 10
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 // Do nothing. The mock core library is already handled in the constructor. 437 // Do nothing. The mock core library is already handled in the constructor.
438 return new Future.value(); 438 return new Future.value();
439 } 439 }
440 440
441 Uri translateResolvedUri(LibraryElement importingLibrary, 441 Uri translateResolvedUri(LibraryElement importingLibrary,
442 Uri resolvedUri, Node node) => resolvedUri; 442 Uri resolvedUri, Node node) => resolvedUri;
443 443
444 // The mock library doesn't need any patches. 444 // The mock library doesn't need any patches.
445 Uri resolvePatchUri(String dartLibraryName) => null; 445 Uri resolvePatchUri(String dartLibraryName) => null;
446 446
447 Future<Script> readScript(Uri uri, [Element element, Node node]) { 447 Future<Script> readScript(Spannable node, Uri uri) {
448 SourceFile sourceFile = sourceFiles[uri.toString()]; 448 SourceFile sourceFile = sourceFiles[uri.toString()];
449 if (sourceFile == null) throw new ArgumentError(uri); 449 if (sourceFile == null) throw new ArgumentError(uri);
450 return new Future.value(new Script(uri, uri, sourceFile)); 450 return new Future.value(new Script(uri, uri, sourceFile));
451 } 451 }
452 452
453 Element lookupElementIn(ScopeContainerElement container, name) { 453 Element lookupElementIn(ScopeContainerElement container, name) {
454 Element element = container.localLookup(name); 454 Element element = container.localLookup(name);
455 return element != null 455 return element != null
456 ? element 456 ? element
457 : new ErroneousElementX(null, null, name, container); 457 : new ErroneousElementX(null, null, name, container);
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 } else { 575 } else {
576 sourceFile = compiler.sourceFiles[uri.toString()]; 576 sourceFile = compiler.sourceFiles[uri.toString()];
577 } 577 }
578 if (sourceFile != null && begin != null && end != null) { 578 if (sourceFile != null && begin != null && end != null) {
579 print(sourceFile.getLocationMessage(message, begin, end, true, (x) => x)); 579 print(sourceFile.getLocationMessage(message, begin, end, true, (x) => x));
580 } else { 580 } else {
581 print(message); 581 print(message);
582 } 582 }
583 }; 583 };
584 } 584 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/exit_code_test.dart ('k') | tests/compiler/dart2js/parser_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698