11// Explicitly use the Custom RNG crates to link them in.
22#[ cfg( feature = "test-stdweb" ) ]
33use stdweb_getrandom as _;
4+ #[ cfg( feature = "test-bindgen" ) ]
5+ use wasm_bindgen_getrandom as _;
46
5- #[ cfg( feature = "wasm -bindgen" ) ]
7+ #[ cfg( feature = "test -bindgen" ) ]
68use wasm_bindgen_test:: * ;
79
810use getrandom:: getrandom;
911
1012#[ cfg( feature = "test-in-browser" ) ]
1113wasm_bindgen_test_configure ! ( run_in_browser) ;
1214
13- #[ cfg_attr( feature = "wasm -bindgen" , wasm_bindgen_test) ]
15+ #[ cfg_attr( feature = "test -bindgen" , wasm_bindgen_test) ]
1416#[ test]
1517fn test_zero ( ) {
1618 // Test that APIs are happy with zero-length requests
1719 getrandom ( & mut [ 0u8 ; 0 ] ) . unwrap ( ) ;
1820}
1921
20- #[ cfg_attr( feature = "wasm -bindgen" , wasm_bindgen_test) ]
22+ #[ cfg_attr( feature = "test -bindgen" , wasm_bindgen_test) ]
2123#[ test]
2224fn test_diff ( ) {
2325 let mut v1 = [ 0u8 ; 1000 ] ;
@@ -35,7 +37,7 @@ fn test_diff() {
3537 assert ! ( n_diff_bits >= v1. len( ) as u32 ) ;
3638}
3739
38- #[ cfg_attr( feature = "wasm -bindgen" , wasm_bindgen_test) ]
40+ #[ cfg_attr( feature = "test -bindgen" , wasm_bindgen_test) ]
3941#[ test]
4042fn test_huge ( ) {
4143 let mut huge = [ 0u8 ; 100_000 ] ;
0 commit comments