TEST: Add test that Some(ArrayVec<[&_;_]>).is_some()

This seems like a trivial test, but since it can fail, it shows us that
we don't have a sound implementation yet.
This commit is contained in:
bluss
2018-12-03 18:40:08 +01:00
parent cc3cb8d282
commit 8f8617b967
+8
View File
@@ -164,6 +164,14 @@ fn test_compact_size() {
assert!(mem::size_of::<QuadArray>() <= 24);
}
#[test]
fn test_still_works_with_option_arrayvec() {
type RefArray = ArrayVec<[&'static i32; 2]>;
let array = Some(RefArray::new());
assert!(array.is_some());
println!("{:?}", array);
}
#[test]
fn test_drain() {
let mut v = ArrayVec::from([0; 8]);