From 7d18a268547734daf19a740b6533e9c1697baf1a Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 28 Oct 2026 23:31:54 +0100 Subject: v1.2.1: track wrapped board lines and split the paytable --- tests/slots.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'tests/slots.rs') diff --git a/tests/slots.rs b/tests/slots.rs index b7292b8..bdf8f10 100644 --- a/tests/slots.rs +++ b/tests/slots.rs @@ -1,6 +1,6 @@ //! Regression tests for the server-side 5x3 slots game. -use zagan_bet::slots::{paytable_line, PAYTABLE}; +use zagan_bet::slots::{paytable_lines, PAYTABLE}; use zagan_bet::server::games::slots::{LineWin, SlotsGame, PAYLINES, REELS, ROWS}; use zagan_bet::server::games::traits::{Game, GamePhase}; @@ -108,16 +108,20 @@ fn theoretical_rtp_is_just_under_one() { } #[test] -fn the_paytable_line_lists_every_symbol_and_fits_80_columns() { - let line = paytable_line(); +fn the_paytable_lines_list_every_symbol_and_fit_80_columns() { + let lines = paytable_lines(); + let joined = lines.join(" "); + assert_eq!(lines.len(), 2, "paytable should be split into two lines"); for (symbol, three, four, five) in PAYTABLE { assert!( - line.contains(&format!("{symbol} {three}/{four}/{five}")), + joined.contains(&format!("{symbol} {three}/{four}/{five}")), "paytable is missing {symbol}" ); } - assert!(line.len() <= 80, "paytable is too wide: {line:?}"); + for line in lines { + assert!(line.len() <= 80, "paytable is too wide: {line:?}"); + } } #[test] -- cgit v1.2.3