Skip to content

Commit 4e07bf8

Browse files
taiki-eAmanieu
authored andcommitted
std_detect: Move aarch64 freebsd test to tests/cpu-detection.rs
1 parent f325623 commit 4e07bf8

File tree

2 files changed

+20
-18
lines changed

2 files changed

+20
-18
lines changed
Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,3 @@
11
//! Run-time feature detection for Aarch64 on FreeBSD.
22
33
pub(crate) use super::super::aarch64::detect_features;
4-
5-
#[cfg(test)]
6-
mod tests {
7-
#[test]
8-
fn dump() {
9-
println!("asimd: {:?}", is_aarch64_feature_detected!("asimd"));
10-
println!("pmull: {:?}", is_aarch64_feature_detected!("pmull"));
11-
println!("fp: {:?}", is_aarch64_feature_detected!("fp"));
12-
println!("fp16: {:?}", is_aarch64_feature_detected!("fp16"));
13-
println!("sve: {:?}", is_aarch64_feature_detected!("sve"));
14-
println!("crc: {:?}", is_aarch64_feature_detected!("crc"));
15-
println!("lse: {:?}", is_aarch64_feature_detected!("lse"));
16-
println!("rdm: {:?}", is_aarch64_feature_detected!("rdm"));
17-
println!("rcpc: {:?}", is_aarch64_feature_detected!("rcpc"));
18-
println!("dotprod: {:?}", is_aarch64_feature_detected!("dotprod"));
19-
println!("tme: {:?}", is_aarch64_feature_detected!("tme"));
20-
}
21-
}

crates/std_detect/tests/cpu-detection.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,26 @@ fn aarch64_windows() {
9797
println!("sha2: {:?}", is_aarch64_feature_detected!("sha2"));
9898
}
9999

100+
#[test]
101+
#[cfg(all(target_arch = "aarch64", target_os = "freebsd"))]
102+
fn aarch64_freebsd() {
103+
println!("asimd: {:?}", is_aarch64_feature_detected!("asimd"));
104+
println!("pmull: {:?}", is_aarch64_feature_detected!("pmull"));
105+
println!("fp: {:?}", is_aarch64_feature_detected!("fp"));
106+
println!("fp16: {:?}", is_aarch64_feature_detected!("fp16"));
107+
println!("sve: {:?}", is_aarch64_feature_detected!("sve"));
108+
println!("crc: {:?}", is_aarch64_feature_detected!("crc"));
109+
println!("lse: {:?}", is_aarch64_feature_detected!("lse"));
110+
println!("rdm: {:?}", is_aarch64_feature_detected!("rdm"));
111+
println!("rcpc: {:?}", is_aarch64_feature_detected!("rcpc"));
112+
println!("dotprod: {:?}", is_aarch64_feature_detected!("dotprod"));
113+
println!("tme: {:?}", is_aarch64_feature_detected!("tme"));
114+
println!("paca: {:?}", is_aarch64_feature_detected!("paca"));
115+
println!("pacg: {:?}", is_aarch64_feature_detected!("pacg"));
116+
println!("aes: {:?}", is_aarch64_feature_detected!("aes"));
117+
println!("sha2: {:?}", is_aarch64_feature_detected!("sha2"));
118+
}
119+
100120
#[test]
101121
#[cfg(all(target_arch = "powerpc", target_os = "linux"))]
102122
fn powerpc_linux() {

0 commit comments

Comments
 (0)