Debian Codegraph @

.cargo/vendor/cpufeatures/tests/x86.rs

raw
1 //! x86/x86_64 tests
2
3 #![cfg(any(target_arch = "x86", target_arch = "x86_64"))]
4
5 cpufeatures::new!(cpuid, "aes", "sha");
6
7 #[test]
8 fn init() {
9 let token: cpuid::InitToken = cpuid::init();
10 assert_eq!(token.get(), cpuid::get());
11 }
12
13 #[test]
14 fn init_get() {
15 let (token, val) = cpuid::init_get();
16 assert_eq!(val, token.get());
17 }