bugfix: cfg(tests) should be cfg(test) (#450)

This commit is contained in:
gnzlbg 2018-05-16 20:59:28 +02:00 committed by Alex Crichton
parent 8ea9bc53f1
commit 9e797f2de1
2 changed files with 5 additions and 18 deletions

View file

@ -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);

View file

@ -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