From 49b8d19e414edc8c9a010220e82e4adfb22a8ac4 Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Wed, 27 Jan 2021 13:41:08 +1100 Subject: [PATCH] test: Log state on failure --- swap/tests/testutils/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/swap/tests/testutils/mod.rs b/swap/tests/testutils/mod.rs index fd0ead1c..94f098d2 100644 --- a/swap/tests/testutils/mod.rs +++ b/swap/tests/testutils/mod.rs @@ -217,7 +217,7 @@ impl TestContext { let lock_tx_id = if let BobState::XmrRedeemed { tx_lock_id } = state { tx_lock_id } else { - panic!("Bob in unexpected state"); + panic!("Bob in not in xmr redeemed state: {:?}", state); }; let lock_tx_bitcoin_fee = self @@ -250,7 +250,7 @@ impl TestContext { let lock_tx_id = if let BobState::BtcRefunded(state4) = state { state4.tx_lock_id() } else { - panic!("Bob in unexpected state"); + panic!("Bob in not in btc refunded state: {:?}", state); }; let lock_tx_bitcoin_fee = self .bob_bitcoin_wallet @@ -282,7 +282,7 @@ impl TestContext { let lock_tx_id = if let BobState::BtcPunished { tx_lock_id } = state { tx_lock_id } else { - panic!("Bob in unexpected state"); + panic!("Bob in not in btc punished state: {:?}", state); }; let lock_tx_bitcoin_fee = self