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 16 matching lines...) Expand all Loading... |
27 print(l.length); | 27 print(l.length); |
28 for (int i = 0; i < l.length; i++) { | 28 for (int i = 0; i < l.length; i++) { |
29 var x = l[i]; | 29 var x = l[i]; |
30 for (int j = 0; j < x.length; j++) { | 30 for (int j = 0; j < x.length; j++) { |
31 print(x[j]); | 31 print(x[j]); |
32 } | 32 } |
33 } | 33 } |
34 }""", | 34 }""", |
35 r""" | 35 r""" |
36 function() { | 36 function() { |
37 var l = ["hest", ["h", "e", "s", "t"]], i, x, j; | 37 var l = ["hest", ["h", "e", "s", "t"]], i = 0, x, j; |
38 P.print(J.getInterceptor$as(l).get$length(l)); | 38 P.print(J.getInterceptor$as(l).get$length(l)); |
39 i = 0; | |
40 while (J.getInterceptor$n(i).$lt(i, J.getInterceptor$as(l).get$length(l))) { | 39 while (J.getInterceptor$n(i).$lt(i, J.getInterceptor$as(l).get$length(l))) { |
41 x = J.getInterceptor$as(l).$index(l, i); | 40 x = J.getInterceptor$as(l).$index(l, i); |
42 j = 0; | 41 j = 0; |
43 while (J.getInterceptor$n(j).$lt(j, J.getInterceptor$as(x).get$length(x))) { | 42 while (J.getInterceptor$n(j).$lt(j, J.getInterceptor$as(x).get$length(x))) { |
44 P.print(J.getInterceptor$as(x).$index(x, j)); | 43 P.print(J.getInterceptor$as(x).$index(x, j)); |
45 j = J.getInterceptor$ns(j).$add(j, 1); | 44 j = J.getInterceptor$ns(j).$add(j, 1); |
46 } | 45 } |
47 i = J.getInterceptor$ns(i).$add(i, 1); | 46 i = J.getInterceptor$ns(i).$add(i, 1); |
48 } | 47 } |
49 return null; | 48 return null; |
50 }"""), | 49 }"""), |
51 ]; | 50 ]; |
52 | 51 |
53 | 52 |
54 void main() { | 53 void main() { |
55 runTests(tests); | 54 runTests(tests); |
56 } | 55 } |
OLD | NEW |