| Index: pkg/unittest/lib/src/core_matchers.dart
|
| diff --git a/pkg/unittest/lib/src/core_matchers.dart b/pkg/unittest/lib/src/core_matchers.dart
|
| index 20e9db2efbb2628e8a9bb4a0f55ad0961d2fadc0..cfb3254758a4ac56a120c0b8dc79722771c8c58f 100644
|
| --- a/pkg/unittest/lib/src/core_matchers.dart
|
| +++ b/pkg/unittest/lib/src/core_matchers.dart
|
| @@ -98,15 +98,15 @@ class _DeepMatcher extends BaseMatcher {
|
| if (actual is !Iterable) {
|
| return 'is not Iterable';
|
| }
|
| - var expectedIterator = expected.iterator();
|
| - var actualIterator = actual.iterator();
|
| + var expectedIterator = expected.iterator;
|
| + var actualIterator = actual.iterator;
|
| var position = 0;
|
| String reason = null;
|
| while (reason == null) {
|
| - if (expectedIterator.hasNext) {
|
| - if (actualIterator.hasNext) {
|
| - Description r = matcher(expectedIterator.next(),
|
| - actualIterator.next(),
|
| + if (expectedIterator.moveNext()) {
|
| + if (actualIterator.moveNext()) {
|
| + Description r = matcher(expectedIterator.current,
|
| + actualIterator.current,
|
| 'mismatch at position ${position}',
|
| depth);
|
| if (r != null) reason = r.toString();
|
| @@ -114,7 +114,7 @@ class _DeepMatcher extends BaseMatcher {
|
| } else {
|
| reason = 'shorter than expected';
|
| }
|
| - } else if (actualIterator.hasNext) {
|
| + } else if (actualIterator.moveNext()) {
|
| reason = 'longer than expected';
|
| } else {
|
| return null;
|
|
|