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

Side by Side Diff: tests/compiler/dart2js/js_backend_cps_ir_basic_test.dart

Issue 1310363006: Patched in Dartium JsInterop (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « tests/co19/co19-dartium.status ('k') | tests/html/fontface_loaded_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 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 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // Tests for basic functionality. 5 // Tests for basic functionality.
6 6
7 library basic_tests; 7 library basic_tests;
8 8
9 import 'js_backend_cps_ir.dart'; 9 import 'js_backend_cps_ir.dart';
10 10
11 const List<TestEntry> tests = const [ 11 const List<TestEntry> tests = const [
12 const TestEntry(r""" 12 const TestEntry(r"""
13 main() { 13 main() {
14 var e = 1; 14 var e = 1;
15 var l = [1, 2, 3]; 15 var l = [1, 2, 3];
16 var m = {'s': 1}; 16 var m = {'s': 1};
17 17
18 print('(' ')'); 18 print('(' ')');
19 print('(${true})'); 19 print('(${true})');
20 print('(${1})'); 20 print('(${1})');
21 print('(${[1, 2, 3]})'); 21 print('(${[1, 2, 3]})');
22 print('(${{'s': 1}})'); 22 print('(${{'s': 1}})');
23 print('($e)'); 23 print('($e)');
24 print('($l)'); 24 print('($l)');
25 print('($m)'); 25 print('($m)');
26 }""",r""" 26 }""",r"""
27 function() { 27 function() {
28 var l = [1, 2, 3], m = P.LinkedHashMap_LinkedHashMap$_literal(["s", 1]);
29 P.print("()"); 28 P.print("()");
30 P.print("(true)"); 29 P.print("(true)");
31 P.print("(1)"); 30 P.print("(1)");
32 P.print("(" + H.S([1, 2, 3]) + ")"); 31 P.print("(" + H.S([1, 2, 3]) + ")");
33 P.print("(" + H.S(P.LinkedHashMap_LinkedHashMap$_literal(["s", 1])) + ")"); 32 P.print("(" + H.S(P.LinkedHashMap_LinkedHashMap$_literal(["s", 1])) + ")");
34 P.print("(1)"); 33 P.print("(1)");
35 P.print("(" + H.S(l) + ")"); 34 P.print("(" + H.S([1, 2, 3]) + ")");
36 P.print("(" + H.S(m) + ")"); 35 P.print("(" + H.S(P.LinkedHashMap_LinkedHashMap$_literal(["s", 1])) + ")");
37 }"""), 36 }"""),
38 const TestEntry(""" 37 const TestEntry("""
39 foo(a, [b = "b"]) { print(b); return b; } 38 foo(a, [b = "b"]) { print(b); return b; }
40 bar(a, {b: "b", c: "c"}) { print(c); return c; } 39 bar(a, {b: "b", c: "c"}) { print(c); return c; }
41 main() { 40 main() {
42 foo(0); 41 foo(0);
43 foo(1, 2); 42 foo(1, 2);
44 bar(3); 43 bar(3);
45 bar(4, b: 5); 44 bar(4, b: 5);
46 bar(6, c: 7); 45 bar(6, c: 7);
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 }""", r""" 170 }""", r"""
172 function() { 171 function() {
173 P.print("Done"); 172 P.print("Done");
174 }""") 173 }""")
175 ]; 174 ];
176 175
177 176
178 void main() { 177 void main() {
179 runTests(tests); 178 runTests(tests);
180 } 179 }
OLDNEW
« no previous file with comments | « tests/co19/co19-dartium.status ('k') | tests/html/fontface_loaded_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698