From 63c2e2fc3ea299aee31b66d2bdd6ecd871df223a Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 28 Oct 2026 22:44:41 +0100 Subject: v0.3.0: add server core, bcrypt migration and plays audit --- tests/slots.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/slots.rs') diff --git a/tests/slots.rs b/tests/slots.rs index 12348c9..df4af28 100644 --- a/tests/slots.rs +++ b/tests/slots.rs @@ -48,6 +48,13 @@ fn no_match_returns_zero() { assert_eq!(game.calculate_payout(&['G', 'D', 'S'], 50), 0); } +#[test] +fn an_enormous_bet_saturates_instead_of_overflowing() { + let game = make_game(); + assert_eq!(game.calculate_payout(&['S', 'S', 'S'], u64::MAX), u64::MAX); + assert_eq!(game.calculate_payout(&['S', 'L', 'S'], u64::MAX), u64::MAX); +} + /// process_action produces a finished state with correct reels and win_type. #[test] fn process_action_spin_sets_finished() { -- cgit v1.2.3