chiark / gitweb /
wdt-hand: New test case for ungrab-then-regrab (2)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 5 Apr 2021 11:37:41 +0000 (12:37 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 14 Jul 2021 18:41:53 +0000 (19:41 +0100)
Check that the piece is now held by alice.
This fails without the grab/regrab fix.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
wdriver/wdt-hand.rs

index ddee3dc18983bd1ca12f7b05f237454699f0949e..c87d792d581e5f7398fed3adc819a13d7161dde3 100644 (file)
@@ -267,6 +267,9 @@ impl Ctx {
       dbgc!(&who.name);
       let w = su.w(who)?;
 
+      let held = w.piece_held(PAWN)?;
+      assert_eq!( held.unwrap(), ALICE );
+
       let log = w.retrieve_log(*gen)?;
       assert_eq!( log.find_conflicts(), Vec::<String>::new() );
     }