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 @@ pub fn main() {
}
}
}
#[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 @@ pub fn size() -> uint { 16u }
}
}
#[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() { }