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

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

Issue 11021008: Added 'dynamic' keyword, so that 'Dynamic' can be deprecated. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated dart2dart test status file with co19 issue as well. Created 8 years, 2 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/co19/co19-dart2js.status ('k') | tests/compiler/dart2js/unparser2_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) 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 // Test constant folding. 4 // Test constant folding.
5 5
6 #library("compiler_helper"); 6 #library("compiler_helper");
7 7
8 #import("dart:uri"); 8 #import("dart:uri");
9 9
10 #import("../../../lib/compiler/implementation/elements/elements.dart", prefix: " lego"); 10 #import("../../../lib/compiler/implementation/elements/elements.dart", prefix: " lego");
(...skipping 29 matching lines...) Expand all
40 40
41 String compileAll(String code) { 41 String compileAll(String code) {
42 Uri uri = new Uri.fromComponents(scheme: 'source'); 42 Uri uri = new Uri.fromComponents(scheme: 'source');
43 MockCompiler compiler = compilerFor(code, uri); 43 MockCompiler compiler = compilerFor(code, uri);
44 compiler.runCompiler(uri); 44 compiler.runCompiler(uri);
45 Expect.isFalse(compiler.compilationFailed, 45 Expect.isFalse(compiler.compilationFailed,
46 'Unexpected compilation error'); 46 'Unexpected compilation error');
47 return compiler.assembledCode; 47 return compiler.assembledCode;
48 } 48 }
49 49
50 Dynamic compileAndCheck(String code, 50 dynamic compileAndCheck(String code,
51 String name, 51 String name,
52 check(MockCompiler compiler, lego.Element element)) { 52 check(MockCompiler compiler, lego.Element element)) {
53 Uri uri = new Uri.fromComponents(scheme: 'source'); 53 Uri uri = new Uri.fromComponents(scheme: 'source');
54 MockCompiler compiler = compilerFor(code, uri); 54 MockCompiler compiler = compilerFor(code, uri);
55 compiler.runCompiler(uri); 55 compiler.runCompiler(uri);
56 lego.Element element = findElement(compiler, name); 56 lego.Element element = findElement(compiler, name);
57 return check(compiler, element); 57 return check(compiler, element);
58 } 58 }
59 59
60 lego.Element findElement(compiler, String name) { 60 lego.Element findElement(compiler, String name) {
(...skipping 26 matching lines...) Expand all
87 '"$generated" does not match /$regexp/'); 87 '"$generated" does not match /$regexp/');
88 } 88 }
89 89
90 void compileAndDoNotMatch(String code, String entry, RegExp regexp) { 90 void compileAndDoNotMatch(String code, String entry, RegExp regexp) {
91 String generated = compile(code, entry); 91 String generated = compile(code, entry);
92 Expect.isFalse(regexp.hasMatch(generated), 92 Expect.isFalse(regexp.hasMatch(generated),
93 '"$generated" has a match in /$regexp/'); 93 '"$generated" has a match in /$regexp/');
94 } 94 }
95 95
96 int length(Link link) => link.isEmpty() ? 0 : length(link.tail) + 1; 96 int length(Link link) => link.isEmpty() ? 0 : length(link.tail) + 1;
OLDNEW
« no previous file with comments | « tests/co19/co19-dart2js.status ('k') | tests/compiler/dart2js/unparser2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698