diff options
Diffstat (limited to 'vendor/rustix/tests/rand')
-rw-r--r-- | vendor/rustix/tests/rand/getrandom.rs | 7 | ||||
-rw-r--r-- | vendor/rustix/tests/rand/main.rs | 9 |
2 files changed, 16 insertions, 0 deletions
diff --git a/vendor/rustix/tests/rand/getrandom.rs b/vendor/rustix/tests/rand/getrandom.rs new file mode 100644 index 000000000..ac316e447 --- /dev/null +++ b/vendor/rustix/tests/rand/getrandom.rs @@ -0,0 +1,7 @@ +use rustix::rand::{getrandom, GetRandomFlags}; + +#[test] +fn test_getrandom() { + let mut buf = [0_u8; 256]; + let _ = getrandom(&mut buf, GetRandomFlags::empty()); +} diff --git a/vendor/rustix/tests/rand/main.rs b/vendor/rustix/tests/rand/main.rs new file mode 100644 index 000000000..9dac8027f --- /dev/null +++ b/vendor/rustix/tests/rand/main.rs @@ -0,0 +1,9 @@ +//! Tests for [`rustix::rand`]. + +#![cfg(feature = "rand")] +#![cfg(not(windows))] +#![cfg_attr(target_os = "wasi", feature(wasi_ext))] +#![cfg_attr(io_lifetimes_use_std, feature(io_safety))] + +#[cfg(any(linux_raw, all(libc, target_os = "linux")))] +mod getrandom; |