| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 //} | 77 //} |
| 78 //"""), | 78 //"""), |
| 79 | 79 |
| 80 const TestEntry(""" | 80 const TestEntry(""" |
| 81 main() { | 81 main() { |
| 82 var list = [1, 2, 3]; | 82 var list = [1, 2, 3]; |
| 83 list[1] = 6; | 83 list[1] = 6; |
| 84 print(list); | 84 print(list); |
| 85 }""", r""" | 85 }""", r""" |
| 86 function() { | 86 function() { |
| 87 var list = [1, 2, 3], v0 = 1; | 87 var v0 = 1, list = [1, 2, 3]; |
| 88 if (v0 < 0 || v0 >= list.length) | 88 if (v0 >= list.length) |
| 89 H.ioore(list, v0); | 89 H.ioore(list, v0); |
| 90 list[v0] = 6; | 90 list[v0] = 6; |
| 91 P.print(list); | 91 P.print(list); |
| 92 }"""), | 92 }"""), |
| 93 ]; | 93 ]; |
| 94 | 94 |
| 95 void main() { | 95 void main() { |
| 96 runTests(tests); | 96 runTests(tests); |
| 97 } | 97 } |
| OLD | NEW |