File: rdseed_tests.rs

package info (click to toggle)
rust-safe-arch 0.9.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 940 kB
  • sloc: python: 66; makefile: 2; sh: 1
file content (24 lines) | stat: -rw-r--r-- 532 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use super::*;

// Note(Lokathor): It's technically possible, and valid, that these could fail
// when run just once. However, if they fail across multiple test runs then
// *that* is when we have a problem.

#[test]
fn test_rdseed_u16() {
  let mut val = 0_u16;
  let _it_worked = rdseed_u16(&mut val);
}

#[test]
fn test_rdseed_u32() {
  let mut val = 0_u32;
  let _it_worked = rdseed_u32(&mut val);
}

#[test]
#[cfg(target_arch = "x86_64")]
fn test_rdseed_u64() {
  let mut val = 0_u64;
  let _it_worked = rdseed_u64(&mut val);
}