File tree 1 file changed +10
-7
lines changed
1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -20,15 +20,18 @@ fn fixed_rng() {
20
20
}
21
21
22
22
#[ test]
23
- #[ cfg( not( target_os="macos" ) ) ] // FIXME entropy does not work on macOS
24
23
fn entropy_rng ( ) {
25
- // Use this opportunity to test querying the RNG (needs an external crate, hence tested here and not in the compiletest suite)
26
- let mut rng = SmallRng :: from_entropy ( ) ;
27
- let _val = rng. gen :: < i32 > ( ) ;
24
+ #[ cfg( not( target_os="macos" ) ) ] // FIXME entropy does not work on macOS
25
+ // (Not disabling the entire test as that would change the output.)
26
+ {
27
+ // Use this opportunity to test querying the RNG (needs an external crate, hence tested here and not in the compiletest suite)
28
+ let mut rng = SmallRng :: from_entropy ( ) ;
29
+ let _val = rng. gen :: < i32 > ( ) ;
28
30
29
- // Also try per-thread RNG.
30
- let mut rng = rand:: thread_rng ( ) ;
31
- let _val = rng. gen :: < i32 > ( ) ;
31
+ // Also try per-thread RNG.
32
+ let mut rng = rand:: thread_rng ( ) ;
33
+ let _val = rng. gen :: < i32 > ( ) ;
34
+ }
32
35
}
33
36
34
37
// A test that won't work on miri
You can’t perform that action at this time.
0 commit comments