| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |