1
0
Fork 0
mirror of https://github.com/BLAKE3-team/BLAKE3 synced 2024-05-28 05:26:04 +02:00

test_reference_impl_size

This commit is contained in:
Jack O'Connor 2019-12-02 17:32:33 -05:00
parent 21df6b1103
commit e4e0b0f99d

View File

@ -13,3 +13,13 @@ pub fn paint_test_input(buf: &mut [u8]) {
offset += take;
}
}
#[test]
fn test_reference_impl_size() {
// Because the Rust compiler optimizes struct layout, it's possible that
// some future version of the compiler will produce a different size. If
// that happens, we can either disable this test, or test for multiple
// expected values. For now, the purpose of this test is to make sure we
// notice if that happens.
assert_eq!(1848, core::mem::size_of::<reference_impl::Hasher>());
}