Add some additional assertions to a couple of tests
@@ -965,13 +965,13 @@ fn iter() {
it2.next();
assert_eq!(it2.len(), 3);
assert_eq!(it2.is_empty(), false);
- it2.next();
+ it2.next_back();
assert_eq!(it2.len(), 2);
assert_eq!(it2.is_empty(), false);
it2.next();
assert_eq!(it2.len(), 1);
assert_eq!(it2.is_empty(), false);
- it2.next();
+ it2.next_back();
assert_eq!(it2.len(), 0);
assert_eq!(it2.is_empty(), true);
let a1 = staticvec![box 1, box 2, box 3];
@@ -1163,8 +1163,22 @@ fn iter_mut() {
assert_eq!(*i.next().unwrap(), 3);
assert_eq!("StaticVecIterMut([])", format!("{:?}", i));
let mut v2 = staticvec![ZST {}, ZST {}, ZST {}, ZST {}];
- let it2 = v2.iter_mut();
+ let mut it2 = v2.iter_mut();
assert_eq!(it2.as_slice(), &[ZST {}, ZST {}, ZST {}, ZST {}]);
+ assert_eq!(it2.len(), 4);
+ assert_eq!(it2.is_empty(), false);
+ it2.next();
+ assert_eq!(it2.len(), 3);
+ assert_eq!(it2.is_empty(), false);
+ it2.next_back();
+ assert_eq!(it2.len(), 2);
+ assert_eq!(it2.is_empty(), false);
+ it2.next();
+ assert_eq!(it2.len(), 1);
+ assert_eq!(it2.is_empty(), false);
+ it2.next_back();
+ assert_eq!(it2.len(), 0);
+ assert_eq!(it2.is_empty(), true);
let mut a1 = staticvec![box 1, box 2, box 3];
let mut a2 = staticvec![box 4, box 5, box 6];
let iter = a1.iter_mut().zip(a2.iter_mut());
