3 #![allow(stable_features)]
4 #![feature(cfg_target_feature)]
9 match env::var("TARGET") {
11 // Skip this tests on i586-unknown-linux-gnu where sse2 is disabled
12 if s.contains("i586") {
18 if cfg!(any(target_arch = "x86", target_arch = "x86_64")) {
19 assert!(cfg!(target_feature = "sse2"),
20 "SSE2 was not detected as available on an x86 platform");
22 // check a negative case too -- allowed on x86, but not enabled by default
23 assert!(cfg!(not(target_feature = "avx2")),
24 "AVX2 shouldn't be detected as available by default on any platform");