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]
pub fn test_transmute() {
use managed::raw::BoxRepr;
unsafe {
let x = @1;
let x: *int = transmute(move x);
assert *x == 1;
let x = @100u8;
let x: *BoxRepr = transmute(move x);
assert (*x).data == 100;
let _x: @int = transmute(move x);
}
}