From 41fdebbedb6d153be57aeb155efb793ecc638156 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 20 May 2022 19:56:06 +0100 Subject: [PATCH] at-currency: wip occult test Signed-off-by: Ian Jackson --- apitest/at-currency.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/apitest/at-currency.rs b/apitest/at-currency.rs index 62b71f64..478871ca 100644 --- a/apitest/at-currency.rs +++ b/apitest/at-currency.rs @@ -48,11 +48,31 @@ impl Ctx { let _ = bank; let _ = pile; } + + #[throws(Explode)] + fn occult(&mut self) { + self.clear_reset_to_demo()?; + + let mut alice = self.connect_player(&self.alice)?; + let mut a_pieces = alice.pieces::()?; + + let mut bob = self.connect_player(&self.bob)?; + + let hand = a_pieces.find_by_desc_glob(otter::hand::UNCLAIMED_HAND_DESC); + alice.api_piece(GH::With, PuSynch(&mut (&mut a_pieces, hand)), + ("k", json!({ "opname": "claim", + "wrc": WRC::Unpredictable })))?; + let hand_pos = a_pieces[hand].pos; + + let _ = &mut bob; + let _ = bob; + } } #[throws(Explode)] fn tests(mut c: Ctx) { test!(c, "multigrab", c.multigrab() ?); + test!(c, "occult", c.occult() ?); } #[throws(Explode)] -- 2.30.2