use protocol::bridge_engine::TableState; use server::table::{Table, InMemoryTable}; mod common; async fn table_basic_test(table: Box) -> Result<(), anyhow::Error> { assert!(matches!(table.state(), TableState::Unknown)); let mut table = table.new_deal().await?; assert!(matches!(table.state(), TableState::Game(_))); while matches!(table.state(), TableState::Game(_)) { table = server::table::advance_play(table).await?; } assert!(matches!(table.state(), TableState::Result(_))); table = table.new_deal().await?; assert!(matches!(table.state(), TableState::Game(_))); Ok(()) } #[tokio::test] #[ignore] async fn in_memory_table() -> Result<(), anyhow::Error> { common::test_setup(); table_basic_test(Box::new(InMemoryTable::new())).await?; Ok(()) }