Extend the test for EscapeUnicode
to also check that it is legitimately an `ExactSizeIterator`.
This commit is contained in:
parent
41950c64a1
commit
6b5e86b0ce
1 changed files with 6 additions and 0 deletions
|
@ -276,6 +276,12 @@ fn eu_iterator_specializations() {
|
||||||
// Check last
|
// Check last
|
||||||
assert_eq!(iter.clone().last(), Some('}'));
|
assert_eq!(iter.clone().last(), Some('}'));
|
||||||
|
|
||||||
|
// Check len
|
||||||
|
assert_eq!(iter.len(), len - offset);
|
||||||
|
|
||||||
|
// Check size_hint (= len in ExactSizeIterator)
|
||||||
|
assert_eq!(iter.size_hint(), (iter.len(), Some(iter.len())));
|
||||||
|
|
||||||
// Check counting
|
// Check counting
|
||||||
assert_eq!(iter.clone().count(), len - offset);
|
assert_eq!(iter.clone().count(), len - offset);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue