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

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

Issue 152593002: Version 1.2.0-dev.3.1 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/dart/
Patch Set: Created 6 years, 10 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 // Smoke test of the dart2js compiler API. 5 // Smoke test of the dart2js compiler API.
6 library analyze_only; 6 library analyze_only;
7 7
8 import "package:expect/expect.dart"; 8 import "package:expect/expect.dart";
9 import 'dart:async'; 9 import 'dart:async';
10 import "package:async_helper/async_helper.dart"; 10 import "package:async_helper/async_helper.dart";
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 throw 'Compilation failed'; 47 throw 'Compilation failed';
48 }).then(asyncSuccess); 48 }).then(asyncSuccess);
49 } 49 }
50 50
51 main() { 51 main() {
52 runCompiler( 52 runCompiler(
53 "", 53 "",
54 [], 54 [],
55 (String code, List errors, List warnings) { 55 (String code, List errors, List warnings) {
56 Expect.isNull(code); 56 Expect.isNull(code);
57 Expect.equals(1, errors.length); 57 Expect.equals(1, errors.length, 'errors=$errors');
58 Expect.equals("Error: Could not find 'main'.", errors[0].toString()); 58 Expect.equals("Error: Could not find 'main'.", errors[0].toString());
59 Expect.isTrue(warnings.isEmpty); 59 Expect.isTrue(warnings.isEmpty, 'warnings=$warnings');
60 }); 60 });
61 61
62 runCompiler( 62 runCompiler(
63 "main() {}", 63 "main() {}",
64 [], 64 [],
65 (String code, List errors, List warnings) { 65 (String code, List errors, List warnings) {
66 Expect.isNotNull(code); 66 Expect.isNotNull(code);
67 Expect.isTrue(errors.isEmpty); 67 Expect.isTrue(errors.isEmpty);
68 Expect.isTrue(warnings.isEmpty); 68 Expect.isTrue(warnings.isEmpty);
69 }); 69 });
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 // --analyze-signatures-only implies --analyze-only 157 // --analyze-signatures-only implies --analyze-only
158 runCompiler( 158 runCompiler(
159 "", 159 "",
160 ['--analyze-signatures-only', '--analyze-all'], 160 ['--analyze-signatures-only', '--analyze-all'],
161 (String code, List errors, List warnings) { 161 (String code, List errors, List warnings) {
162 Expect.isNull(code); 162 Expect.isNull(code);
163 Expect.isTrue(errors.isEmpty); 163 Expect.isTrue(errors.isEmpty);
164 Expect.isTrue(warnings.isEmpty); 164 Expect.isTrue(warnings.isEmpty);
165 }); 165 });
166 } 166 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/analyze_helper.dart ('k') | tests/compiler/dart2js/check_members_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698