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

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

Issue 1276843008: dart2js cps: Change rewriting of equality operators. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update test + minor improvement in logical rewriter Created 5 years, 4 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
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 of operators. 5 // Tests of operators.
6 6
7 library operators_tests; 7 library operators_tests;
8 8
9 import 'js_backend_cps_ir.dart'; 9 import 'js_backend_cps_ir.dart';
10 10
(...skipping 22 matching lines...) Expand all
33 print(foo ? "hello world" : "bad bad"); 33 print(foo ? "hello world" : "bad bad");
34 }""",""" 34 }""","""
35 function() { 35 function() {
36 P.print(V.foo() ? "hello world" : "bad bad"); 36 P.print(V.foo() ? "hello world" : "bad bad");
37 }"""), 37 }"""),
38 const TestEntry(""" 38 const TestEntry("""
39 get foo => foo; 39 get foo => foo;
40 main() { print(foo && foo); } 40 main() { print(foo && foo); }
41 """, """ 41 """, """
42 function() { 42 function() {
43 P.print(V.foo() ? !!P.identical(V.foo(), true) : false); 43 P.print(V.foo() ? V.foo() === true : false);
44 }"""), 44 }"""),
45 const TestEntry(""" 45 const TestEntry("""
46 get foo => foo; 46 get foo => foo;
47 main() { print(foo || foo); } 47 main() { print(foo || foo); }
48 """,""" 48 ""","""
49 function() { 49 function() {
50 P.print(V.foo() ? true : !!P.identical(V.foo(), true)); 50 P.print(V.foo() ? true : V.foo() === true);
51 }"""), 51 }"""),
52 52
53 // Needs interceptor calling convention 53 // Needs interceptor calling convention
54 //const TestEntry(""" 54 //const TestEntry("""
55 //class Foo { 55 //class Foo {
56 // operator[]=(index, value) { 56 // operator[]=(index, value) {
57 // print(value); 57 // print(value);
58 // } 58 // }
59 //} 59 //}
60 //main() { 60 //main() {
(...skipping 16 matching lines...) Expand all
77 if (v0 < 0 || v0 >= list.length) 77 if (v0 < 0 || v0 >= list.length)
78 H.ioore(list, v0); 78 H.ioore(list, v0);
79 list[v0] = 6; 79 list[v0] = 6;
80 P.print(list); 80 P.print(list);
81 }"""), 81 }"""),
82 ]; 82 ];
83 83
84 void main() { 84 void main() {
85 runTests(tests); 85 runTests(tests);
86 } 86 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/js_backend_cps_ir_control_flow_test.dart ('k') | tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698