Run (most) common tests against the custom RNG

Signed-off-by: Joe Richey <joerichey@google.com>
This commit is contained in:
Joe Richey
2022-10-21 16:51:01 -07:00
parent 92af82ab9a
commit ee0ca47aa2
2 changed files with 4 additions and 2 deletions
+1
View File
@@ -13,6 +13,7 @@ fn test_zero() {
}
#[test]
#[cfg(not(feature = "custom"))]
fn test_diff() {
let mut v1 = [0u8; 1000];
getrandom_impl(&mut v1).unwrap();
+3 -2
View File
@@ -7,8 +7,6 @@
))]
use wasm_bindgen_test::wasm_bindgen_test as test;
#[cfg(feature = "test-in-browser")]
wasm_bindgen_test::wasm_bindgen_test_configure!(run_in_browser);
use core::num::NonZeroU32;
use getrandom::{getrandom, register_custom_getrandom, Error};
@@ -33,6 +31,9 @@ fn super_insecure_rng(buf: &mut [u8]) -> Result<(), Error> {
register_custom_getrandom!(super_insecure_rng);
use getrandom::getrandom as getrandom_impl;
mod common;
#[test]
fn custom_rng_output() {
let mut buf = [0u8; 4];