We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17bfa94 commit 54e83f3Copy full SHA for 54e83f3
src/rng.rs
@@ -46,15 +46,20 @@ impl TryRngCore for OsRng {
46
47
impl TryCryptoRng for OsRng {}
48
49
-#[test]
50
-fn test_os_rng() {
51
- let x = OsRng.try_next_u64().unwrap();
52
- let y = OsRng.try_next_u64().unwrap();
53
- assert!(x != 0);
54
- assert!(x != y);
55
-}
+#[cfg(test)]
+mod test {
+ use super::*;
+
+ #[test]
+ fn test_os_rng() {
+ let x = OsRng.try_next_u64().unwrap();
56
+ let y = OsRng.try_next_u64().unwrap();
57
+ assert!(x != 0);
58
+ assert!(x != y);
59
+ }
60
-fn test_construction() {
- assert!(OsRng.try_next_u64().unwrap() != 0);
61
62
+ fn test_construction() {
63
+ assert!(OsRng.try_next_u64().unwrap() != 0);
64
65
}
0 commit comments