Skip to content

Commit

Permalink
Extend the test for EscapeUnicode
Browse files Browse the repository at this point in the history
to also check that it is legitimately an `ExactSizeIterator`.
  • Loading branch information
ranma42 committed May 26, 2016
1 parent 41950c6 commit 6b5e86b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/libcoretest/char.rs
Expand Up @@ -276,6 +276,12 @@ fn eu_iterator_specializations() {
// Check last
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
assert_eq!(iter.clone().count(), len - offset);

Expand Down

0 comments on commit 6b5e86b

Please sign in to comment.