add provenance-related test
This commit is contained in:
parent
f2ae9e580a
commit
a4b966a07f
1 changed files with 7 additions and 0 deletions
|
|
@ -10,6 +10,7 @@ fn main() {
|
|||
bytewise_ptr_methods();
|
||||
bytewise_custom_memcpy();
|
||||
bytewise_custom_memcpy_chunked();
|
||||
int_load_strip_provenance();
|
||||
}
|
||||
|
||||
/// Some basic smoke tests for provenance.
|
||||
|
|
@ -137,3 +138,9 @@ fn bytewise_custom_memcpy_chunked() {
|
|||
assert_eq!(*ptr, 42);
|
||||
}
|
||||
}
|
||||
|
||||
fn int_load_strip_provenance() {
|
||||
let ptrs = [&42];
|
||||
let ints: [usize; 1] = unsafe { mem::transmute(ptrs) };
|
||||
assert_eq!(ptrs[0] as *const _ as usize, ints[0]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue