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

Side by Side 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: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 // Tests for basic functionality.
6
7 library basic_tests;
8
9 import 'js_backend_cps_ir_test.dart';
10
11 const List<TestEntry> tests = const [
12 const TestEntry(
13 """
14 foo(a) {
15 return a;
16 }
17 main() {
18 var a = 10;
19 var b = 1;
20 var t;
21 t = a;
22 a = b;
23 b = t;
24 print(a);
25 print(b);
26 print(b);
27 print(foo(a));
28 }
29 """,
30 """
31 function() {
32 var a, b;
33 a = 10;
34 b = 1;
35 P.print(b);
36 P.print(a);
37 P.print(a);
38 P.print(V.foo(b));
39 return null;
40 }"""),
41 const TestEntry(
42 """
43 foo() { return 42; }
44 main() { return foo(); }
45 """,
46 """function() {
47 return V.foo();
48 }"""),
49 const TestEntry("main() {}"),
50 const TestEntry("main() { return 42; }"),
51 const TestEntry("main() { return; }", """
52 function() {
53 return null;
54 }"""),
55 ];
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698