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 interceptors. | 5 // Tests of interceptors. |
6 | 6 |
7 library interceptors_tests; | 7 library interceptors_tests; |
8 | 8 |
9 import 'js_backend_cps_ir.dart'; | 9 import 'js_backend_cps_ir.dart'; |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 print(l.length); | 26 print(l.length); |
27 for (int i = 0; i < l.length; i++) { | 27 for (int i = 0; i < l.length; i++) { |
28 var x = l[i]; | 28 var x = l[i]; |
29 for (int j = 0; j < x.length; j++) { | 29 for (int j = 0; j < x.length; j++) { |
30 print(x[j]); | 30 print(x[j]); |
31 } | 31 } |
32 } | 32 } |
33 }""", | 33 }""", |
34 r""" | 34 r""" |
35 function() { | 35 function() { |
36 var l = ["hest", ["h", "e", "s", "t"]], i = 0, x, j; | 36 var l = ["hest", ["h", "e", "s", "t"]], i = 0, x_, x, j; |
37 P.print(l.length); | 37 P.print(l.length); |
38 while (i < l.length) { | 38 while (i < l.length) { |
39 if (i < 0 || i >= l.length) | 39 if (i < 0 || i >= l.length) |
40 H.ioore(l, i); | 40 H.ioore(l, i); |
41 x = l[i]; | 41 x_ = J.getInterceptor$as(x = l[i]); |
42 j = 0; | 42 j = 0; |
43 while (j < J.getInterceptor$as(x).get$length(x)) { | 43 while (j < x_.get$length(x)) { |
44 P.print(J.getInterceptor$as(x).$index(x, j)); | 44 P.print(x_.$index(x, j)); |
45 j = j + 1; | 45 j = j + 1; |
46 } | 46 } |
47 i = i + 1; | 47 i = i + 1; |
48 } | 48 } |
49 }"""), | 49 }"""), |
50 ]; | 50 ]; |
51 | 51 |
52 | 52 |
53 void main() { | 53 void main() { |
54 runTests(tests); | 54 runTests(tests); |
55 } | 55 } |
OLD | NEW |