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

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

Issue 368833002: Cleanup warnings in unit tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix outdated type annotations. Created 6 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 | « no previous file | tests/compiler/dart2js/cpa_inference_test.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 // Test that the compiler can handle imports when package root has not been set. 5 // Test that the compiler can handle imports when package root has not been set.
6 6
7 library dart2js.test.missing_file; 7 library dart2js.test.missing_file;
8 8
9 import 'dart:io' show exit; 9 import 'dart:io' show exit;
10 import 'package:expect/expect.dart'; 10 import 'package:expect/expect.dart';
(...skipping 30 matching lines...) Expand all
41 messages.add([message, kind]); 41 messages.add([message, kind]);
42 } 42 }
43 43
44 void call(Uri uri, int begin, int end, String message, kind) { 44 void call(Uri uri, int begin, int end, String message, kind) {
45 diagnosticHandler(uri, begin, end, message, kind); 45 diagnosticHandler(uri, begin, end, message, kind);
46 } 46 }
47 47
48 String prefixMessage(String message, Diagnostic kind) { 48 String prefixMessage(String message, Diagnostic kind) {
49 return message; 49 return message;
50 } 50 }
51
52 int fatalCount;
53
54 int throwOnErrorCount;
51 } 55 }
52 56
53 testOutputProvider(script, libraryRoot, packageRoot, inputProvider, handler, 57 testOutputProvider(script, libraryRoot, packageRoot, inputProvider, handler,
54 [options, outputProvider, environment]) { 58 [options, outputProvider, environment]) {
55 diagnosticHandler = new CollectingFormattingDiagnosticHandler(); 59 diagnosticHandler = new CollectingFormattingDiagnosticHandler();
56 outputProvider("/non/existing/directory/should/fail/file", "js"); 60 outputProvider("/non/existing/directory/should/fail/file", "js");
57 } 61 }
58 62
59 void main() { 63 void main() {
60 compileFunc = testOutputProvider; 64 compileFunc = testOutputProvider;
61 exitFunc = (exitCode) { 65 exitFunc = (exitCode) {
62 CollectingFormattingDiagnosticHandler handler = diagnosticHandler; 66 CollectingFormattingDiagnosticHandler handler = diagnosticHandler;
63 Expect.equals(1, handler.messages.length); 67 Expect.equals(1, handler.messages.length);
64 var message = handler.messages[0]; 68 var message = handler.messages[0];
65 Expect.isTrue(message[0].contains("Cannot open file")); 69 Expect.isTrue(message[0].contains("Cannot open file"));
66 Expect.equals(Diagnostic.ERROR, message[1]); 70 Expect.equals(Diagnostic.ERROR, message[1]);
67 Expect.equals(1, exitCode); 71 Expect.equals(1, exitCode);
68 exit(0); 72 exit(0);
69 }; 73 };
70 compile(["foo.dart", "--out=bar.dart"]); 74 compile(["foo.dart", "--out=bar.dart"]);
71 } 75 }
OLDNEW
« no previous file with comments | « no previous file | tests/compiler/dart2js/cpa_inference_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698