Fix the test for transmute

This commit is contained in:
Brian Anderson 2012-12-12 18:41:30 -08:00
parent 6047dd35bb
commit 948754b572

View File

@ -130,10 +130,11 @@ pub mod tests {
#[test] #[test]
pub fn test_transmute() { pub fn test_transmute() {
use managed::raw::BoxRepr;
unsafe { unsafe {
let x = @1; let x = @100u8;
let x: *int = transmute(move x); let x: *BoxRepr = transmute(move x);
assert *x == 1; assert (*x).data == 100;
let _x: @int = transmute(move x); let _x: @int = transmute(move x);
} }
} }