mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 06:22:00 +00:00
test: fix for missing ARM support
This commit is contained in:
parent
773f7e7560
commit
8eb22ecd6d
@ -11,6 +11,7 @@
|
||||
|
||||
|
||||
#[cfg(target_arch = "x86")]
|
||||
#[cfg(target_arch = "arm")]
|
||||
fn target() {
|
||||
assert!((-1000 as uint >> 3u == 536870787u));
|
||||
}
|
||||
|
@ -13,3 +13,6 @@ pub fn main() { }
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
pub fn main() { }
|
||||
|
||||
#[cfg(target_arch = "arm")]
|
||||
pub fn main() { }
|
||||
|
@ -22,3 +22,6 @@ mod hello;
|
||||
|
||||
#[cfg(target_os = "freebsd")]
|
||||
mod hello;
|
||||
|
||||
#[cfg(target_os = "android")]
|
||||
mod hello;
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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));
|
||||
|
@ -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 }
|
||||
|
@ -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}};
|
||||
|
@ -56,6 +56,7 @@ fn test2() {
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "x86")]
|
||||
#[cfg(target_arch = "arm")]
|
||||
fn test2() {
|
||||
}
|
||||
|
||||
|
@ -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() { }
|
||||
|
Loading…
Reference in New Issue
Block a user