Skip to content

Commit

Permalink
Merge pull request #49 from Konippi/add-testcase-to-seeded-state
Browse files Browse the repository at this point in the history
chore: add testcase to `seeded_state`
  • Loading branch information
Noratrieb committed Jul 27, 2024
2 parents e1b3727 + 5742cea commit eb049a8
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 eb049a8

Please sign in to comment.