diff --git a/lib/wallet/cardano-wallet.cabal b/lib/wallet/cardano-wallet.cabal index 55f17d40437..347c69b1458 100644 --- a/lib/wallet/cardano-wallet.cabal +++ b/lib/wallet/cardano-wallet.cabal @@ -857,6 +857,7 @@ test-suite unit Cardano.Wallet.DB.Sqlite.TypesSpec Cardano.Wallet.DB.StateMachine Cardano.Wallet.DB.Store.DeltaUTxO.ModelSpec + Cardano.Wallet.DB.Store.DeltaUTxO.TxOutBinarySpec Cardano.Wallet.DB.Store.Meta.ModelSpec Cardano.Wallet.DB.Store.Meta.StoreSpec Cardano.Wallet.DB.Store.Submissions.StoreSpec diff --git a/lib/wallet/test/unit/Cardano/Wallet/DB/Store/DeltaUTxO/TxOutBinarySpec.hs b/lib/wallet/test/unit/Cardano/Wallet/DB/Store/DeltaUTxO/TxOutBinarySpec.hs new file mode 100644 index 00000000000..5b8729171e5 --- /dev/null +++ b/lib/wallet/test/unit/Cardano/Wallet/DB/Store/DeltaUTxO/TxOutBinarySpec.hs @@ -0,0 +1,23 @@ +{-# LANGUAGE ScopedTypeVariables #-} +module Cardano.Wallet.DB.Store.DeltaUTxO.TxOutBinarySpec + ( spec + ) +where + +import Prelude + +import Cardano.Wallet.DB.Arbitrary + () +import Cardano.Wallet.DB.Store.DeltaUTxO.TxOutBinary + ( deserializeTxOut, serializeTxOut ) +import Test.Hspec + ( Spec, describe, it ) +import Test.QuickCheck + ( Testable (property), (===) ) + +spec :: Spec +spec = do + describe "TxOutBinary" $ do + it "can serialize and deserialize TxOut" $ + property $ \txOut -> + deserializeTxOut (serializeTxOut txOut) === Right txOut