mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +11:00
use assert_eq and collect
This commit is contained in:
parent
389e3ecadb
commit
dbf7715e67
|
@ -531,13 +531,16 @@ mod test {
|
||||||
}
|
}
|
||||||
|
|
||||||
// output will be unzipped, so input is LRLRLRLRLRLRLR... and output is LLLLLLRRRRRR
|
// output will be unzipped, so input is LRLRLRLRLRLRLR... and output is LLLLLLRRRRRR
|
||||||
assert!(output_buffer
|
assert_eq!(
|
||||||
.iter()
|
output_buffer
|
||||||
.flat_map(|x| x.to_le_bytes())
|
.iter()
|
||||||
.map(|x| x as i8)
|
.flat_map(|x| x.to_le_bytes())
|
||||||
.eq([
|
.map(|x| x as i8)
|
||||||
|
.collect::<alloc::vec::Vec<_>>(),
|
||||||
|
&[
|
||||||
10, 5, -10, -6, 0, 2, 127, 127, 10, 5, -10, -6, 0, 2, 127, 127, 10, 5, -11, -6, 1,
|
10, 5, -10, -6, 0, 2, 127, 127, 10, 5, -10, -6, 0, 2, 127, 127, 10, 5, -11, -6, 1,
|
||||||
3, -128, -128, 10, 5, -11, -6, 1, 3, -128, -128
|
3, -128, -128, 10, 5, -11, -6, 1, 3, -128, -128
|
||||||
]));
|
]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue