chiark / gitweb /
at-currency: More tests
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 21 May 2022 12:32:25 +0000 (13:32 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 21 May 2022 12:32:25 +0000 (13:32 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
apitest/at-currency.rs

index 7c6e2492f9f24ec765896bd2653133b72e1015d3..1776256da47366ff20132a939915f5764456f5b7 100644 (file)
@@ -80,7 +80,18 @@ impl Ctx {
 
     alice.move_money(&mut a_pieces, bank, 399, "u000000000", hand_pos)?;
     alice.synchu(&mut a_pieces)?;
+    // old bank has 1f, current piece has 399
+
+    let div1_pos = (hand_pos + PosC::new(-30,-5))?;
+    alice.move_money(&mut a_pieces, bank, 99, "u010000000", div1_pos)?;
+    // in hand has 300, current piece, aside, has 99
     
+    alice.move_money(&mut a_pieces, bank, 9, "u020000000", hand_pos)?;
+    alice.synchu(&mut a_pieces)?;
+    // aside has 90, in hand has 9, original hand pos has 309
+
+    bob.synch()?;
+
     let _ = &mut bob;
     let _ = bob;
   }