Skip to content

Commit

Permalink
TxTrace: add more counter examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ch1bo committed Apr 17, 2024
1 parent a6d4c7d commit 412af76
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions hydra-node/test/Hydra/Chain/Direct/TxTraceSpec.hs
Expand Up @@ -137,7 +137,7 @@ instance StateModel Model where

initialState =
Model
{ snapshots = []
{ snapshots = [] -- TODO: could be replaced by using latestSnapshot
, headState = Open 0
, lastResult = Nothing
, alreadyContested = []
Expand Down Expand Up @@ -271,7 +271,9 @@ instance RunModel Model IO where
_ -> pure False
_ -> pure True

postconditionOnFailure (_modelBefore, _modelAfter) action _lookup result =
postconditionOnFailure (modelBefore, _modelAfter) action _lookup result = do
counterexamplePost (show modelBefore)
counterexamplePost (show action)
case action of
Decrement{} -> expectInvalid result
Close{} -> expectInvalid result
Expand Down

0 comments on commit 412af76

Please sign in to comment.