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

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

Issue 743973002: Add list literals in js cps codegen. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments 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
new file mode 100644
index 0000000000000000000000000000000000000000..af9644e49bfe23d227591ba015fffd7b3ff1abc5
--- /dev/null
+++ b/tests/compiler/dart2js/js_backend_cps_ir_basic.dart
@@ -0,0 +1,55 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Tests for basic functionality.
+
+library basic_tests;
+
+import 'js_backend_cps_ir_test.dart';
+
+const List<TestEntry> tests = const [
+ const TestEntry(
+ """
+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));
+}
+ """,
+ """
+function() {
+ var a, b;
+ a = 10;
+ b = 1;
+ P.print(b);
+ P.print(a);
+ P.print(a);
+ P.print(V.foo(b));
+ return null;
+}"""),
+ const TestEntry(
+ """
+foo() { return 42; }
+main() { return foo(); }
+ """,
+ """function() {
+ return V.foo();
+}"""),
+ const TestEntry("main() {}"),
+ const TestEntry("main() { return 42; }"),
+ const TestEntry("main() { return; }", """
+function() {
+ return null;
+}"""),
+];
« no previous file with comments | « pkg/compiler/lib/src/js_backend/codegen/glue.dart ('k') | tests/compiler/dart2js/js_backend_cps_ir_literals.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698