test: fix for missing ARM support

This commit is contained in:
Young-il Choi 2013-04-23 11:31:54 +09:00
parent 773f7e7560
commit 8eb22ecd6d
9 changed files with 31 additions and 0 deletions

View File

@ -11,6 +11,7 @@
#[cfg(target_arch = "x86")]
#[cfg(target_arch = "arm")]
fn target() {
assert!((-1000 as uint >> 3u == 536870787u));
}

View File

@ -13,3 +13,6 @@ pub fn main() { }
#[cfg(target_arch = "x86_64")]
pub fn main() { }
#[cfg(target_arch = "arm")]
pub fn main() { }

View File

@ -22,3 +22,6 @@ mod hello;
#[cfg(target_os = "freebsd")]
mod hello;
#[cfg(target_os = "android")]
mod hello;

View File

@ -49,3 +49,14 @@ mod m {
}
}
}
#[cfg(target_os = "android")]
mod m {
#[cfg(target_arch = "arm")]
pub fn main() {
unsafe {
assert!(::rusti::pref_align_of::<u64>() == 8u);
assert!(::rusti::min_align_of::<u64>() == 4u);
}
}
}

View File

@ -27,6 +27,7 @@ pub fn main() {
}
#[cfg(target_arch = "x86")]
#[cfg(target_arch = "arm")]
pub fn main() {
assert!((sys::size_of::<Cat>() == 4 as uint));
assert!((sys::size_of::<Kitty>() == 8 as uint));

View File

@ -32,6 +32,7 @@ struct Outer {
#[cfg(target_arch = "x86")]
#[cfg(target_arch = "arm")]
mod m {
pub fn align() -> uint { 4u }
pub fn size() -> uint { 8u }

View File

@ -57,6 +57,15 @@ mod m {
}
}
#[cfg(target_os = "android")]
mod m {
#[cfg(target_arch = "arm")]
pub mod m {
pub fn align() -> uint { 4u }
pub fn size() -> uint { 12u }
}
}
pub fn main() {
unsafe {
let x = Outer {c8: 22u8, t: Inner {c64: 44u64}};

View File

@ -56,6 +56,7 @@ fn test2() {
}
#[cfg(target_arch = "x86")]
#[cfg(target_arch = "arm")]
fn test2() {
}

View File

@ -40,4 +40,5 @@ pub fn main() {
#[cfg(target_os = "macos")]
#[cfg(target_os = "linux")]
#[cfg(target_os = "freebsd")]
#[cfg(target_os = "android")]
pub fn main() { }