Skip to content

Commit

Permalink
chore: add testcase to seeded_state
Browse files Browse the repository at this point in the history
  • Loading branch information
Konippi committed Jul 26, 2024
1 parent e1b3727 commit 5742cea
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/seeded_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@ mod tests {

use crate::FxSeededState;

#[test]
fn same_seed_produces_same_hasher() {
let seed = 1;
let a = FxSeededState::with_seed(seed);
let b = FxSeededState::with_seed(seed);

// The hashers should be the same, as they have the same seed.
assert_eq!(a.build_hasher().hash, b.build_hasher().hash);
}

#[test]
fn different_states_are_different() {
let a = FxSeededState::with_seed(1);
Expand Down

0 comments on commit 5742cea

Please sign in to comment.