MCPcopy Create free account
hub / github.com/bytecodealliance/rustix / test_getrandom

Function test_getrandom

tests/rand/getrandom.rs:5–9  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3
4#[test]
5fn test_getrandom() {
6 let mut buf = [0_u8; 256];
7 let len = getrandom(&mut buf, GetRandomFlags::empty()).unwrap();
8 assert!(len <= buf.len());
9}
10
11#[test]
12fn test_getrandom_uninit() {

Callers

nothing calls this directly

Calls 1

getrandomFunction · 0.50

Tested by

no test coverage detected