preseed rng for display_fromstr_bijection test case

This commit is contained in:
Christian Schwarz
2023-12-15 15:44:09 +00:00
parent 28479529ae
commit 888a7311f4
3 changed files with 6 additions and 2 deletions

1
Cargo.lock generated
View File

@@ -3167,6 +3167,7 @@ dependencies = [
"enum-map",
"hex",
"postgres_ffi",
"rand 0.8.5",
"serde",
"serde_json",
"serde_with",

View File

@@ -24,3 +24,4 @@ workspace_hack.workspace = true
[dev-dependencies]
bincode.workspace = true
rand.workspace = true

View File

@@ -159,10 +159,12 @@ mod tests {
use crate::key::Key;
use rand::Rng;
use rand::SeedableRng;
#[test]
fn display_fromstr_bijection() {
let mut rng = rand::thread_rng();
use rand::Rng;
let mut rng = rand::rngs::StdRng::seed_from_u64(42);
let key = Key {
field1: rng.gen(),