Fix deque tests
This commit is contained in:
parent
9f5f609b1c
commit
ab428b6480
@ -257,6 +257,7 @@ mod tests {
|
||||
use core::cmp::Eq;
|
||||
use core::kinds::Copy;
|
||||
use core::vec::capacity;
|
||||
use core;
|
||||
|
||||
#[test]
|
||||
fn test_simple() {
|
||||
@ -463,12 +464,12 @@ mod tests {
|
||||
#[test]
|
||||
fn test_iter() {
|
||||
let mut d = Deque::new();
|
||||
for std::int::range(0,5) |i| {
|
||||
for core::int::range(0,5) |i| {
|
||||
d.add_back(i);
|
||||
}
|
||||
assert_eq!(d.iter().collect::<~[&int]>(), ~[&0,&1,&2,&3,&4]);
|
||||
|
||||
for std::int::range(6,9) |i| {
|
||||
for core::int::range(6,9) |i| {
|
||||
d.add_front(i);
|
||||
}
|
||||
assert_eq!(d.iter().collect::<~[&int]>(), ~[&8,&7,&6,&0,&1,&2,&3,&4]);
|
||||
@ -477,12 +478,12 @@ mod tests {
|
||||
#[test]
|
||||
fn test_rev_iter() {
|
||||
let mut d = Deque::new();
|
||||
for std::int::range(0,5) |i| {
|
||||
for core::int::range(0,5) |i| {
|
||||
d.add_back(i);
|
||||
}
|
||||
assert_eq!(d.rev_iter().collect::<~[&int]>(), ~[&4,&3,&2,&1,&0]);
|
||||
|
||||
for std::int::range(6,9) |i| {
|
||||
for core::int::range(6,9) |i| {
|
||||
d.add_front(i);
|
||||
}
|
||||
assert_eq!(d.rev_iter().collect::<~[&int]>(), ~[&4,&3,&2,&1,&0,&6,&7,&8]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user