1
0
Fork 0
firefox/third_party/rust/cpufeatures/tests/x86.rs
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

17 lines
339 B
Rust

//! x86/x86_64 tests
#![cfg(any(target_arch = "x86", target_arch = "x86_64"))]
cpufeatures::new!(cpuid, "aes", "sha");
#[test]
fn init() {
let token: cpuid::InitToken = cpuid::init();
assert_eq!(token.get(), cpuid::get());
}
#[test]
fn init_get() {
let (token, val) = cpuid::init_get();
assert_eq!(val, token.get());
}