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

Unified Diff: tests/compiler/dart2js/closure_codegen_test.dart

Issue 209383005: Revert "Rename [call$...] properties to [$...] in compiled code." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/_internal/lib/js_helper.dart ('k') | tests/compiler/dart2js/compiler_helper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/closure_codegen_test.dart
diff --git a/tests/compiler/dart2js/closure_codegen_test.dart b/tests/compiler/dart2js/closure_codegen_test.dart
index e3f9f4a509c8e161889a5519d6ca10c94fc60e49..0474b0227b33e798e887ba8f619bc110a9c53051 100644
--- a/tests/compiler/dart2js/closure_codegen_test.dart
+++ b/tests/compiler/dart2js/closure_codegen_test.dart
@@ -32,38 +32,35 @@ main() {
const String TEST_BAILOUT = r"""
class A {
var x;
- foo(_) { // make sure only g has no arguments
+ foo() {
var f = function g() { return 499; };
return 499 + x + f();
}
}
-main() { new A().foo(1); }
+main() { new A().foo(); }
""";
-closureInvocation(bool minify, String prefix) {
- String generated = compile(TEST_INVOCATION0, minify: minify);
- Expect.isTrue(generated.contains(".$prefix\$0()"));
- generated = compile(TEST_INVOCATION1, minify: minify);
- Expect.isTrue(generated.contains(".$prefix\$1(1)"));
- generated = compile(TEST_INVOCATION2, minify: minify);
- Expect.isTrue(generated.contains(".$prefix\$2(1,${minify ? "" : " "}2)"));
+closureInvocation() {
+ String generated = compile(TEST_INVOCATION0);
+ Expect.isTrue(generated.contains(r".call$0()"));
+ generated = compile(TEST_INVOCATION1);
+ Expect.isTrue(generated.contains(r".call$1(1)"));
+ generated = compile(TEST_INVOCATION2);
+ Expect.isTrue(generated.contains(r".call$2(1, 2)"));
}
// Make sure that the bailout version does not introduce a second version of
// the closure.
-closureBailout(bool minify, String prefix) {
- asyncTest(() => compileAll(TEST_BAILOUT, minify: minify)
- .then((generated) {
- RegExp regexp = new RegExp("$prefix\\\$0:${minify ? "" : " "}function");
+closureBailout() {
+ asyncTest(() => compileAll(TEST_BAILOUT).then((generated) {
+ RegExp regexp = new RegExp(r'call\$0: function');
Iterator<Match> matches = regexp.allMatches(generated).iterator;
checkNumberOfMatches(matches, 1);
}));
}
main() {
- closureInvocation(false, "call");
- closureInvocation(true, "");
- closureBailout(false, "call");
- closureBailout(true, "");
+ closureInvocation();
+ closureBailout();
}
« no previous file with comments | « sdk/lib/_internal/lib/js_helper.dart ('k') | tests/compiler/dart2js/compiler_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698