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

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

Issue 742023002: Handle named and optional arguments in cps-ir. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix syntax 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_basic.dart
diff --git a/tests/compiler/dart2js/js_backend_cps_ir_basic.dart b/tests/compiler/dart2js/js_backend_cps_ir_basic.dart
index af9644e49bfe23d227591ba015fffd7b3ff1abc5..3f60d79c7987326440e78ef22c145497808a8bc3 100644
--- a/tests/compiler/dart2js/js_backend_cps_ir_basic.dart
+++ b/tests/compiler/dart2js/js_backend_cps_ir_basic.dart
@@ -9,6 +9,28 @@ library basic_tests;
import 'js_backend_cps_ir_test.dart';
const List<TestEntry> tests = const [
+ const TestEntry("""
+foo(a, [b = "b"]) => b;
+bar(a, {b: "b", c: "c"}) => c;
+main() {
+ foo(0);
+ foo(0, 1);
+ bar(0);
+ bar(0, b: 1);
+ bar(0, c: 1);
+ bar(0, b: 1, c: 2);
+}
+""",
+"""
+function() {
+ V.foo(0, "b");
+ V.foo(0, 1);
+ V.bar(0, "b", "c");
+ V.bar(0, 1, "c");
+ V.bar(0, "b", 1);
+ V.bar(0, 1, 2);
+ return null;
+}"""),
const TestEntry(
"""
foo(a) {

Powered by Google App Engine
This is Rietveld 408576698