Chromium Code Reviews| Index: tests/compiler/dart2js/js_backend_cps_ir_operators_test.dart |
| diff --git a/tests/compiler/dart2js/js_backend_cps_ir_operators_test.dart b/tests/compiler/dart2js/js_backend_cps_ir_operators_test.dart |
| index 1665195824e2c4e45aab088ebae96264c57fafdb..877b3714f376f5d65d815b282a1144b04a5ee2f2 100644 |
| --- a/tests/compiler/dart2js/js_backend_cps_ir_operators_test.dart |
| +++ b/tests/compiler/dart2js/js_backend_cps_ir_operators_test.dart |
| @@ -11,7 +11,8 @@ import 'js_backend_cps_ir.dart'; |
| const List<TestEntry> tests = const [ |
| const TestEntry("main() { return true ? 42 : 'foo'; }"), |
| const TestEntry(""" |
| -foo() => foo(); |
| +var x = 1; |
| +foo() => ++x > 10; |
|
Kevin Millikin (Google)
2015/09/15 13:50:10
Yuck.
asgerf
2015/09/15 14:06:40
I just don't want it to get constant folded or dep
|
| main() { |
| print(foo() ? "hello world" : "bad bad"); |
| }""",""" |
| @@ -19,16 +20,17 @@ function() { |
| P.print(V.foo() ? "hello world" : "bad bad"); |
| }"""), |
| const TestEntry(""" |
| -foo() { print('foo'); } |
| +var x = 1; |
| +foo() => ++x > 10; |
| main() { |
| print(foo() ? "hello world" : "bad bad"); |
| }""",""" |
| function() { |
| - V.foo(); |
| - P.print("bad bad"); |
| + P.print(V.foo() ? "hello world" : "bad bad"); |
| }"""), |
| const TestEntry(""" |
| -get foo => foo; |
| +var x = 1; |
| +get foo => ++x > 10; |
| main() { |
| print(foo ? "hello world" : "bad bad"); |
| }""",""" |
| @@ -36,19 +38,28 @@ function() { |
| P.print(V.foo() ? "hello world" : "bad bad"); |
| }"""), |
| const TestEntry(""" |
| -get foo => foo; |
| +var x = 1; |
| +get foo => ++x > 10; |
| main() { print(foo && foo); } |
| """, """ |
| function() { |
| P.print(V.foo() ? !!V.foo() : false); |
| }"""), |
| const TestEntry(""" |
| -get foo => foo; |
| +var x = 1; |
| +get foo => ++x > 10; |
| main() { print(foo || foo); } |
| """,""" |
| function() { |
| P.print(V.foo() ? true : !!V.foo()); |
| }"""), |
| +const TestEntry(""" |
| +get foo => foo; |
| +main() { print(foo || foo); } |
| +""",""" |
| +function() { |
| + V.foo(); |
| +}"""), |
| // Needs interceptor calling convention |
| //const TestEntry(""" |