[go: up one dir, main page]

cpufeatures 0.1.1

Lightweight and efficient no-std compatible alternative to the is_x86_feature_detected! macro
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! ARM64 tests

#![cfg(target_arch = "aarch64")]

cpufeatures::new!(armcaps_aes_sha2_sha3, "aes", "sha2", "sha3");

#[test]
fn init() {
    let token: armcaps_aes_sha2_sha3::InitToken = armcaps_aes_sha2_sha3::init();
    assert_eq!(token.get(), armcaps_aes_sha2_sha3::get());
}

#[test]
fn init_get() {
    let (token, val) = armcaps_aes_sha2_sha3::init_get();
    assert_eq!(val, token.get());
}