std::str: Add test for CharIterator .clone()
This commit is contained in:
@@ -3139,6 +3139,14 @@ mod tests {
|
||||
assert_eq!(pos, v.len());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_iterator_clone() {
|
||||
let s = "ศไทย中华Việt Nam";
|
||||
let mut it = s.iter();
|
||||
it.next();
|
||||
assert!(it.zip(it.clone()).all(|(x,y)| x == y));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_byte_iterator() {
|
||||
let s = ~"ศไทย中华Việt Nam";
|
||||
|
||||
Reference in New Issue
Block a user