| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 import "dart:collection"; | 5 import "dart:collection"; |
| 6 import "package:expect/expect.dart"; | 6 import "package:expect/expect.dart"; |
| 7 | 7 |
| 8 class A extends IterableBase { | 8 class A extends IterableBase { |
| 9 int count; | 9 int count; |
| 10 A(this.count); | 10 A(this.count); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 main() { | 36 main() { |
| 37 var a = new A(10); | 37 var a = new A(10); |
| 38 Expect.equals(10, a.length); | 38 Expect.equals(10, a.length); |
| 39 a = new A(0); | 39 a = new A(0); |
| 40 Expect.equals(0, a.length); | 40 Expect.equals(0, a.length); |
| 41 a = new A(5); | 41 a = new A(5); |
| 42 Expect.equals(5, a.map((e) => e + 1).length); | 42 Expect.equals(5, a.map((e) => e + 1).length); |
| 43 Expect.equals(3, a.where((e) => e >= 3).length); | 43 Expect.equals(3, a.where((e) => e >= 3).length); |
| 44 } | 44 } |
| OLD | NEW |