Skip to content

Commit f9aa8ad

Browse files
committed
Run (most) common tests against the custom RNG
Signed-off-by: Joe Richey <[email protected]>
1 parent 2845f2c commit f9aa8ad

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tests/common/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ fn test_zero() {
1313
}
1414

1515
#[test]
16+
#[cfg(not(feature = "custom"))]
1617
fn test_diff() {
1718
let mut v1 = [0u8; 1000];
1819
getrandom_impl(&mut v1).unwrap();

tests/custom.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
))]
88

99
use wasm_bindgen_test::wasm_bindgen_test as test;
10-
#[cfg(feature = "test-in-browser")]
11-
wasm_bindgen_test::wasm_bindgen_test_configure!(run_in_browser);
1210

1311
use core::num::NonZeroU32;
1412
use getrandom::{getrandom, register_custom_getrandom, Error};
@@ -33,6 +31,9 @@ fn super_insecure_rng(buf: &mut [u8]) -> Result<(), Error> {
3331

3432
register_custom_getrandom!(super_insecure_rng);
3533

34+
use getrandom::getrandom as getrandom_impl;
35+
mod common;
36+
3637
#[test]
3738
fn custom_rng_output() {
3839
let mut buf = [0u8; 4];

0 commit comments

Comments
 (0)