From 8bee61e33d2feb78dc076413d10d66929de2face Mon Sep 17 00:00:00 2001 From: Olivier Giniaux Date: Sat, 1 Jun 2024 14:29:33 +0200 Subject: [PATCH] Add stability checks with negative seeds --- src/gxhash/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gxhash/mod.rs b/src/gxhash/mod.rs index fe86b85..7fff5ed 100644 --- a/src/gxhash/mod.rs +++ b/src/gxhash/mod.rs @@ -219,5 +219,8 @@ mod tests { assert_eq!(4243413987, gxhash32(&[0u8; 1], 0)); assert_eq!(2401749549, gxhash32(&[0u8; 1000], 0)); assert_eq!(4156851105, gxhash32(&[42u8; 4242], 42)); + assert_eq!(1981427771, gxhash32(&[42u8; 4242], -42)); + assert_eq!(1156095992, gxhash32(b"Hello World", i64::MAX)); + assert_eq!(540827083, gxhash32(b"Hello World", i64::MIN)); } }