Rollup merge of #77233 - ssomers:btree_size_matters, r=Mark-Simulacrum
BTreeMap: keep an eye out on the size of the main components r? @Mark-Simulacrum
This commit is contained in:
commit
7ad03dd91d
1 changed files with 9 additions and 0 deletions
|
@ -23,3 +23,12 @@ fn test_splitpoint() {
|
||||||
assert!(left_len + right_len == CAPACITY);
|
assert!(left_len + right_len == CAPACITY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
#[cfg(target_arch = "x86_64")]
|
||||||
|
fn test_sizes() {
|
||||||
|
assert_eq!(core::mem::size_of::<LeafNode<(), ()>>(), 16);
|
||||||
|
assert_eq!(core::mem::size_of::<LeafNode<i64, i64>>(), 16 + CAPACITY * 8 * 2);
|
||||||
|
assert_eq!(core::mem::size_of::<InternalNode<(), ()>>(), 112);
|
||||||
|
assert_eq!(core::mem::size_of::<InternalNode<i64, i64>>(), 112 + CAPACITY * 8 * 2);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue