mononoke: add a test for MPathElement size

Summary: Add a test to detect any unexpected changes in MPatheElements size

Reviewed By: farnz

Differential Revision: D23703345

fbshipit-source-id: 74354f0861b048ee4611304fc99f0289bce4a7a5
This commit is contained in:
Alex Hornby 2020-09-15 03:41:08 -07:00 committed by Facebook GitHub Bot
parent dfb8a524bf
commit 8d5855a2aa

View File

@ -1126,6 +1126,14 @@ where
mod test { mod test {
use super::*; use super::*;
use quickcheck::{quickcheck, TestResult}; use quickcheck::{quickcheck, TestResult};
use std::mem::size_of;
#[test]
fn test_mpath_element_size() {
// MPathElement size is important as we have a lot of them.
// Test so we are aware of any change.
assert_eq!(32, size_of::<MPathElement>());
}
#[test] #[test]
fn get_path_hash_multiple_elem() { fn get_path_hash_multiple_elem() {