Chromium Code Reviews| Index: tests/compiler/dart2js/compiler_helper.dart |
| =================================================================== |
| --- tests/compiler/dart2js/compiler_helper.dart (revision 13712) |
| +++ tests/compiler/dart2js/compiler_helper.dart (working copy) |
| @@ -17,9 +17,9 @@ |
| #import("mock_compiler.dart"); |
| #import("parser_helper.dart"); |
| -String compile(String code, [String entry = 'main', |
| - bool enableTypeAssertions = false, |
| - bool minify = false]) { |
| +String compile(String code, {String entry: 'main', |
| + bool enableTypeAssertions: false, |
| + bool minify: false}) { |
|
Lasse Reichstein Nielsen
2012/10/17 14:56:10
It would be great if entry was an optional positio
regis
2012/10/17 19:58:16
Yes, a mix of both flavors would be useful here.
|
| MockCompiler compiler = |
| new MockCompiler(enableTypeAssertions: enableTypeAssertions, |
| enableMinification: minify); |
| @@ -84,13 +84,13 @@ |
| } |
| void compileAndMatch(String code, String entry, RegExp regexp) { |
| - String generated = compile(code, entry); |
| + String generated = compile(code, entry: entry); |
| Expect.isTrue(regexp.hasMatch(generated), |
| '"$generated" does not match /$regexp/'); |
| } |
| void compileAndDoNotMatch(String code, String entry, RegExp regexp) { |
| - String generated = compile(code, entry); |
| + String generated = compile(code, entry: entry); |
| Expect.isFalse(regexp.hasMatch(generated), |
| '"$generated" has a match in /$regexp/'); |
| } |
| @@ -109,7 +109,7 @@ |
| void compileAndMatchFuzzyHelper( |
| String code, String entry, String regexp, bool shouldMatch) { |
| - String generated = compile(code, entry); |
| + String generated = compile(code, entry: entry); |
| final xRe = new RegExp('\\bx\\b'); |
| regexp = regexp.replaceAll(xRe, '(?:$anyIdentifier)'); |
| final spaceRe = new RegExp('\\s+'); |