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

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

Issue 1563883004: dart2js Rebase a compiler test whose output has changed. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | no next file » | 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]), value _ = C.JSArray_methods, res, v0, v1; 28 var l = [1, 2, 3], m = P.LinkedHashMap_LinkedHashMap$_literal(["s", 1]), v0, v 1;
29 P.print("()"); 29 P.print("()");
30 P.print("(true)"); 30 P.print("(true)");
31 P.print("(1)"); 31 P.print("(1)");
32 if (!(typeof (res = value_.toString$0(v0 = [1, 2, 3])) === "string")) 32 if (!(typeof (v0 = P.IterableBase_iterableToFullString(v1 = [1, 2, 3], "[", "] ")) === "string"))
33 throw H.wrapException(H.argumentErrorValue(v0)); 33 throw H.wrapException(H.argumentErrorValue(v1));
34 P.print("(" + res + ")"); 34 P.print("(" + v0 + ")");
35 if (!(typeof (v1 = P.Maps_mapToString(v0 = P.LinkedHashMap_LinkedHashMap$_lite ral(["s", 1]))) === "string")) 35 if (!(typeof (v0 = P.Maps_mapToString(v1 = P.LinkedHashMap_LinkedHashMap$_lite ral(["s", 1]))) === "string"))
36 throw H.wrapException(H.argumentErrorValue(v0)); 36 throw H.wrapException(H.argumentErrorValue(v1));
37 P.print("(" + v0 + ")");
38 P.print("(1)");
39 if (!(typeof (v1 = P.IterableBase_iterableToFullString(l, "[", "]")) === "stri ng"))
40 throw H.wrapException(H.argumentErrorValue(l));
37 P.print("(" + v1 + ")"); 41 P.print("(" + v1 + ")");
38 P.print("(1)"); 42 if (!(typeof (v1 = P.Maps_mapToString(m)) === "string"))
39 if (!(typeof (res = value_.toString$0(l)) === "string"))
40 throw H.wrapException(H.argumentErrorValue(l));
41 P.print("(" + res + ")");
42 if (!(typeof (v0 = P.Maps_mapToString(m)) === "string"))
43 throw H.wrapException(H.argumentErrorValue(m)); 43 throw H.wrapException(H.argumentErrorValue(m));
44 P.print("(" + v0 + ")"); 44 P.print("(" + v1 + ")");
45 }"""), 45 }"""),
46 const TestEntry(""" 46 const TestEntry("""
47 foo(a, [b = "b"]) { print(b); return b; } 47 foo(a, [b = "b"]) { print(b); return b; }
48 bar(a, {b: "b", c: "c"}) { print(c); return c; } 48 bar(a, {b: "b", c: "c"}) { print(c); return c; }
49 main() { 49 main() {
50 foo(0); 50 foo(0);
51 foo(1, 2); 51 foo(1, 2);
52 bar(3); 52 bar(3);
53 bar(4, b: 5); 53 bar(4, b: 5);
54 bar(6, c: 7); 54 bar(6, c: 7);
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 }""", r""" 244 }""", r"""
245 function() { 245 function() {
246 P.print("Done"); 246 P.print("Done");
247 }""") 247 }""")
248 ]; 248 ];
249 249
250 250
251 void main() { 251 void main() {
252 runTests(tests); 252 runTests(tests);
253 } 253 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698