mirror of
https://github.com/denoland/rusty_v8.git
synced 2025-01-23 23:49:53 -05:00
Assert that Option<Local<T>> is the same size as *const T (#79)
This commit is contained in:
parent
9443b1475b
commit
1e86b84a3b
1 changed files with 7 additions and 0 deletions
|
@ -43,3 +43,10 @@ where
|
||||||
unsafe { std::mem::transmute(v) }
|
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>());
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue