mirror of
https://github.com/openharmony/third_party_rust_tinyvec.git
synced 2026-07-19 22:33:42 -04:00
Account for heap allocated capacities.
This commit is contained in:
@@ -21,6 +21,12 @@ fn TinyVec_swap_remove() {
|
||||
assert_eq!(&tv[..], &[][..]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn TinyVec_capacity() {
|
||||
let tv: TinyVec<[i32; 10]> = Default::default();
|
||||
assert_eq!(tv.capacity(), 10);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn TinyVec_drain() {
|
||||
let mut tv: TinyVec<[i32; 10]> = Default::default();
|
||||
|
||||
Reference in New Issue
Block a user