0
0
Fork 0
mirror of https://github.com/denoland/rusty_v8.git synced 2024-12-24 08:09:16 -05:00

Assert that Option<Local<T>> is the same size as *const T (#79)

This commit is contained in:
Bert Belder 2019-12-19 00:43:21 +01:00
parent 9443b1475b
commit 1e86b84a3b
No known key found for this signature in database
GPG key ID: 7A77887B2E2ED461

View file

@ -43,3 +43,10 @@ where
unsafe { std::mem::transmute(v) }
}
}
#[test]
fn test_size_of_local() {
use std::mem::size_of;
assert_eq!(size_of::<Local<Value>>(), size_of::<*const Value>());
assert_eq!(size_of::<Option<Local<Value>>>(), size_of::<*const Value>());
}