| 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 "package:expect/expect.dart"; | 5 import "package:expect/expect.dart"; |
| 6 | 6 |
| 7 main() { | 7 main() { |
| 8 List<int> list1 = <int>[1, 2, 3]; | 8 List<int> list1 = <int>[1, 2, 3]; |
| 9 List<int> list2 = const <int>[4, 5]; | 9 List<int> list2 = const <int>[4, 5]; |
| 10 List<String> list3 = <String>[]; | 10 List<String> list3 = <String>[]; |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 Expect.isNull(it.current); | 111 Expect.isNull(it.current); |
| 112 Expect.isTrue(it.moveNext()); | 112 Expect.isTrue(it.moveNext()); |
| 113 Expect.isTrue(it.current != null); | 113 Expect.isTrue(it.current != null); |
| 114 Expect.isTrue(it.moveNext()); | 114 Expect.isTrue(it.moveNext()); |
| 115 Expect.isTrue(it.current != null); | 115 Expect.isTrue(it.current != null); |
| 116 Expect.isTrue(it.moveNext()); | 116 Expect.isTrue(it.moveNext()); |
| 117 Expect.isTrue(it.current != null); | 117 Expect.isTrue(it.current != null); |
| 118 Expect.isFalse(it.moveNext()); | 118 Expect.isFalse(it.moveNext()); |
| 119 Expect.isNull(it.current); | 119 Expect.isNull(it.current); |
| 120 | 120 |
| 121 takeWhileFalse = set2.takeWhile((x) => false); | 121 var dynamicTakeWhileFalse = set2.takeWhile((x) => false); |
| 122 it = takeWhileFalse.iterator; | 122 var dynamicIt = dynamicTakeWhileFalse.iterator; |
| 123 Expect.isNull(it.current); | 123 Expect.isNull(dynamicIt.current); |
| 124 Expect.isFalse(it.moveNext()); | 124 Expect.isFalse(dynamicIt.moveNext()); |
| 125 Expect.isNull(it.current); | 125 Expect.isNull(dynamicIt.current); |
| 126 | 126 |
| 127 takeEverything = set2.takeWhile((x) => true); | 127 var dynamicTakeEverything = set2.takeWhile((x) => true); |
| 128 it = takeEverything.iterator; | 128 dynamicIt = dynamicTakeEverything.iterator; |
| 129 Expect.isNull(it.current); | 129 Expect.isNull(dynamicIt.current); |
| 130 Expect.isFalse(it.moveNext()); | 130 Expect.isFalse(dynamicIt.moveNext()); |
| 131 Expect.isNull(it.current); | 131 Expect.isNull(dynamicIt.current); |
| 132 } | 132 } |
| OLD | NEW |