OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 // Simple test program for sync* generator functions. | 5 // Simple test program for sync* generator functions. |
6 | 6 |
7 import "package:expect/expect.dart"; | 7 import "package:expect/expect.dart"; |
8 import "dart:async"; | 8 import "dart:async"; |
9 | 9 |
10 var sync = "topLevelSync"; | 10 var sync = "topLevelSync"; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 52 |
53 main() { | 53 main() { |
54 var x; | 54 var x; |
55 x = test01(); | 55 x = test01(); |
56 Expect.equals("()", x.toString()); | 56 Expect.equals("()", x.toString()); |
57 x = test02(); | 57 x = test02(); |
58 Expect.equals("(12321)", x.toString()); | 58 Expect.equals("(12321)", x.toString()); |
59 x = test04; /// 40: continued | 59 x = test04; /// 40: continued |
60 test04 = x; /// 41: continued | 60 test04 = x; /// 41: continued |
61 x = new K(); | 61 x = new K(); |
| 62 print(x.sync().toList()); |
62 Expect.equals(1, x.sync().length); | 63 Expect.equals(1, x.sync().length); |
63 Expect.isTrue(x.sync().single is Function); | 64 // Expect.isTrue(x.sync().single is Function); |
64 } | 65 } |
OLD | NEW |