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

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

Issue 51953009: Add new argument to compiler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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/analyze_helper.dart ('k') | tests/compiler/dart2js/codegen_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) 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 import 'package:expect/expect.dart'; 5 import 'package:expect/expect.dart';
6 import 'memory_source_file_helper.dart'; 6 import 'memory_source_file_helper.dart';
7 import "package:async_helper/async_helper.dart"; 7 import "package:async_helper/async_helper.dart";
8 8
9 import '../../../sdk/lib/_internal/compiler/compiler.dart' 9 import '../../../sdk/lib/_internal/compiler/compiler.dart'
10 show Diagnostic; 10 show Diagnostic;
(...skipping 18 matching lines...) Expand all
29 } else { 29 } else {
30 throw 'unexpected diagnostic $kind: $message'; 30 throw 'unexpected diagnostic $kind: $message';
31 } 31 }
32 } 32 }
33 33
34 Compiler compiler = new Compiler(provider.readStringFromUri, 34 Compiler compiler = new Compiler(provider.readStringFromUri,
35 (name, extension) => null, 35 (name, extension) => null,
36 diagnosticHandler, 36 diagnosticHandler,
37 libraryRoot, 37 libraryRoot,
38 packageRoot, 38 packageRoot,
39 ['--analyze-only']); 39 ['--analyze-only'],
40 {});
40 asyncTest(() => compiler.run(Uri.parse('memory:main.dart')).then((_) { 41 asyncTest(() => compiler.run(Uri.parse('memory:main.dart')).then((_) {
41 Expect.isTrue(compiler.compilationFailed); 42 Expect.isTrue(compiler.compilationFailed);
42 Expect.equals(5, errorCount); 43 Expect.equals(5, errorCount);
43 Expect.equals(1, warningCount); 44 Expect.equals(1, warningCount);
44 })); 45 }));
45 } 46 }
46 47
47 const Map MEMORY_SOURCE_FILES = const { 48 const Map MEMORY_SOURCE_FILES = const {
48 'main.dart': """ 49 'main.dart': """
49 main() { 50 main() {
50 for (var x, y in []) { 51 for (var x, y in []) {
51 } 52 }
52 53
53 for (var x = 10 in []) { 54 for (var x = 10 in []) {
54 } 55 }
55 56
56 for (x.y in []) { // Also causes a warning "x unresolved". 57 for (x.y in []) { // Also causes a warning "x unresolved".
57 } 58 }
58 59
59 for ((){}() in []) { 60 for ((){}() in []) {
60 } 61 }
61 62
62 for (1 in []) { 63 for (1 in []) {
63 } 64 }
64 } 65 }
65 """ 66 """
66 }; 67 };
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/analyze_helper.dart ('k') | tests/compiler/dart2js/codegen_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698