Skip to content

Commit

Permalink
Fix tests for for Mary
Browse files Browse the repository at this point in the history
  • Loading branch information
lehins committed Jan 20, 2022
1 parent 0dbd33a commit 75b953f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,5 @@ txBodyTest =
testGroup
"TxBody"
[ fieldTests,
testCase "length" (assertEqual "length" 36 (Short.length (bytes txM)))
testCase "length" (assertEqual "length" 57 (Short.length (bytes txM)))
]
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import Control.State.Transition.Extended hiding (Assertion)
import Control.State.Transition.Trace (checkTrace, (.-), (.->))
import Data.Default.Class (def)
import GHC.Records
import GHC.Stack
import Test.Cardano.Ledger.EraBuffet (TestCrypto)
import Test.Cardano.Ledger.Shelley.Utils (applySTSTest, runShelleyBase)
import Test.Tasty.HUnit (Assertion, (@?=))
Expand All @@ -36,6 +37,7 @@ ignoreAllButUTxO ::
ignoreAllButUTxO = fmap (\(UTxOState utxo _ _ _ _, _) -> utxo)

testMaryNoDelegLEDGER ::
HasCallStack =>
UTxO MaryTest ->
Tx MaryTest ->
LedgerEnv MaryTest ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
-- Description : Multi-Assets Examples
--
-- Examples demonstrating the use of multi-assets.
module Test.Cardano.Ledger.Mary.Examples.MultiAssets
( multiAssetsExample,
)
where
module Test.Cardano.Ledger.Mary.Examples.MultiAssets where
-- ( multiAssetsExample,
-- )
-- where

import Cardano.Ledger.BaseTypes (StrictMaybe (..))
import Cardano.Ledger.Coin (Coin (..))
Expand Down Expand Up @@ -204,7 +204,7 @@ expectedUTxOSimpleEx1 =
----------------------------

minUtxoSimpleEx2 :: Coin
minUtxoSimpleEx2 = Coin 115
minUtxoSimpleEx2 = Coin 117

aliceCoinsSimpleEx2 :: Coin
aliceCoinsSimpleEx2 = aliceCoinSimpleEx1 <-> (feeEx <+> minUtxoSimpleEx2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,12 +333,6 @@ goldenEncodingTestsMary =
. TkInteger 2
. TkMapLen 2
)
<> S policyID2
<> T
( TkMapLen 1
. TkBytes assetName3
. TkInteger 19
)
<> S policyID1
<> T
( TkMapLen 2
Expand All @@ -347,6 +341,12 @@ goldenEncodingTestsMary =
. TkBytes assetName2
. TkInteger 17
)
<> S policyID2
<> T
( TkMapLen 1
. TkBytes assetName3
. TkInteger 19
)
),
checkEncodingCBOR
"value_with_negative"
Expand Down

0 comments on commit 75b953f

Please sign in to comment.