Skip to content

Commit

Permalink
Reorder asserts in TransactionExecTest
Browse files Browse the repository at this point in the history
Because _crResult is more important, we should assert on it first.

Change-Id: Id00000007a5762c813b59dcca9020168b46d4fda
  • Loading branch information
edmundnoble committed Jan 26, 2025
1 parent 2c0bd70 commit a2dcb86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/unit/Chainweb/Test/Pact5/TransactionExecTest.hs
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,8 @@ applyCmdCoinTransfer rdb = readFromAfterGenesis v rdb $ do
e <- applyCmd logger (Just logger) pactDb txCtx (TxBlockIdx 0) noSPVSupport (Gas 1) (view payloadObj <$> cmd)
e & P.match _Right
? P.checkAll
[ P.fun _crEvents ? P.list
[ P.fun _crResult ? P.equals ? PactResultOk (PString "Write succeeded")
, P.fun _crEvents ? P.list
-- transfer event and gas redeem event
[ event
(P.equals "TRANSFER")
Expand All @@ -700,7 +701,6 @@ applyCmdCoinTransfer rdb = readFromAfterGenesis v rdb $ do
(P.equals [PString "sender00", PString "NoMiner", PDecimal 22.7])
(P.equals coinModuleName)
]
, P.fun _crResult ? P.equals ? PactResultOk (PString "Write succeeded")
-- reflects buyGas gas usage, as well as that of the payload
, P.fun _crGas ? P.equals ? Gas expectedGasConsumed
, P.fun _crContinuation ? P.equals ? Nothing
Expand Down

0 comments on commit a2dcb86

Please sign in to comment.