Skip to content

Commit

Permalink
bugfix: cfg(tests) should be cfg(test) (rust-lang#450)
Browse files Browse the repository at this point in the history
  • Loading branch information
gnzlbg authored and alexcrichton committed May 16, 2018
1 parent 217ba4e commit 38ed665
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
21 changes: 4 additions & 17 deletions coresimd/powerpc/altivec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,27 +330,14 @@ where
a.vec_add(b)
}

#[cfg(tests)]
#[cfg(all(test, target_arch = "powerpc64"))]
mod tests {
use coresimd::arch::powerpc::*;
#[cfg(target_arch = "powerpc64")]
use coresimd::arch::powerpc64::*;
use simd::*;
use stdsimd_test::simd_test;

#[simd_test = "altivec"]
unsafe fn endianness() {
let x = i32x4::new(0, 1, 2, 3);
for i in 0..4 {
assert_eq!(x.extract(i), i);
}

let x: i16x8 = x.into_bits();
let e: i16x8 = i16x8::new(0, 0, 0, 0, 0, 0, 0, 0);
for i in 0..8 {
assert_eq!(x.extract(i), e.extract(i));
}
}

#[simd_test = "altivec"]
#[simd_test(enable = "altivec")]
unsafe fn vec_add_i32x4_i32x4() {
let x = i32x4::new(1, 2, 3, 4);
let y = i32x4::new(4, 3, 2, 1);
Expand Down
2 changes: 1 addition & 1 deletion crates/simd-test-macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pub fn simd_test(
"i686" | "x86_64" | "i586" => "is_x86_feature_detected",
"arm" | "armv7" => "is_arm_feature_detected",
"aarch64" => "is_aarch64_feature_detected",
"powerpc64" => "is_powerpc64_feature_detected",
"powerpc64" | "powerpc64le" => "is_powerpc64_feature_detected",
"mips" | "mipsel" => {
// FIXME:
// On MIPS CI run-time feature detection always returns false due
Expand Down

0 comments on commit 38ed665

Please sign in to comment.