getrandom/tests/normal.rs
Joseph Richey 347a300215
Add test for custom RNG handler (#197)
See #194

This uses the fact that `wasm32-unknown-unknown` is an "unsupported" target. This means we can use the `"custom"` feature to define a custom handler, and then write tests to make sure that function is called.
2021-01-05 02:00:21 -08:00

12 lines
293 B
Rust

// Don't test on custom wasm32-unknown-unknown
#![cfg(not(all(
target_arch = "wasm32",
target_os = "unknown",
feature = "custom",
not(feature = "js")
)))]
// Use the normal getrandom implementation on this architecture.
use getrandom::getrandom as getrandom_impl;
mod common;