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

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

Issue 726543002: Add support for local variables(including parameters) to cps->js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: added test. Created 6 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 side-by-side diff with in-line comments
Download patch
Index: tests/compiler/dart2js/js_backend_cps_ir_test.dart
diff --git a/tests/compiler/dart2js/js_backend_cps_ir_test.dart b/tests/compiler/dart2js/js_backend_cps_ir_test.dart
index ed91d0079ff2fa321e89e3e05dff15d0ca5f4864..69d8cbe6365a8493d490203cb12822bae7446973 100644
--- a/tests/compiler/dart2js/js_backend_cps_ir_test.dart
+++ b/tests/compiler/dart2js/js_backend_cps_ir_test.dart
@@ -17,8 +17,25 @@ const String TEST_MAIN_FILE = 'test.dart';
/// The list of tests to run.
const List<String> RAW_TESTS = const [
"""
- foo() { return 42; }
- main() { return foo(); }
+foo(a) {
+ return a;
+}
+main() {
+ var a = 10;
+ var b = 1;
+ var t;
+ t = a;
+ a = b;
+ b = t;
+ print(a);
+ print(b);
+ print(b);
+ print(foo(a));
+}
+ """,
+ """
+foo() { return 42; }
+main() { return foo(); }
""",
"main() {}",
"main() { return 42; }",

Powered by Google App Engine
This is Rietveld 408576698