Skip to content

Commit eb049a8

Browse files
authored
Merge pull request #49 from Konippi/add-testcase-to-seeded-state
chore: add testcase to `seeded_state`
2 parents e1b3727 + 5742cea commit eb049a8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/seeded_state.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,16 @@ mod tests {
4343

4444
use crate::FxSeededState;
4545

46+
#[test]
47+
fn same_seed_produces_same_hasher() {
48+
let seed = 1;
49+
let a = FxSeededState::with_seed(seed);
50+
let b = FxSeededState::with_seed(seed);
51+
52+
// The hashers should be the same, as they have the same seed.
53+
assert_eq!(a.build_hasher().hash, b.build_hasher().hash);
54+
}
55+
4656
#[test]
4757
fn different_states_are_different() {
4858
let a = FxSeededState::with_seed(1);

0 commit comments

Comments
 (0)