File tree Expand file tree Collapse file tree 2 files changed +15
-14
lines changed
quickcheck-dynamic/src/Test/QuickCheck Expand file tree Collapse file tree 2 files changed +15
-14
lines changed Original file line number Diff line number Diff line change @@ -297,7 +297,8 @@ prettyWitnesses Do{} = []
297297instance StateModel s => Show (DynLogicTest s ) where
298298 show (BadPrecondition is ss bad s) =
299299 " -- Initial state: "
300- ++ show is
300+ ++ show s
301+ ++ " \n "
301302 ++ prettyTestSequence (usedVariables is ss <> allVariables bad) ss
302303 ++ " \n -- In state: "
303304 ++ show s
@@ -312,21 +313,17 @@ instance StateModel s => Show (DynLogicTest s) where
312313 | p == PosPolarity = " action"
313314 | otherwise = " failingAction"
314315 show (Looping is ss) =
315- " -- Initial state: "
316- ++ show is
317- ++ prettyTestSequence (usedVariables is ss) ss
318- ++ " \n pure ()\n -- Looping"
316+ showTest is ss
317+ ++ " \n -- Looping"
319318 show (Stuck is ss s) =
320- " -- Initial state: "
321- ++ show is
322- ++ prettyTestSequence (usedVariables is ss) ss
323- ++ " \n pure ()\n -- Stuck in state "
319+ showTest is ss
320+ ++ " \n -- Stuck in state "
324321 ++ show s
325322 show (DLScript is ss) =
326- " -- Initial state: "
327- ++ show is
328- ++ prettyTestSequence (usedVariables is ss) ss
329- ++ " \n pure () \n "
323+ showTest is ss
324+
325+ showTest :: StateModel s => Annotated s -> TestSequence s -> String
326+ showTest is ss = " -- Initial state: " ++ show is ++ " \n " ++ prettyTestSequence (usedVariables is ss) ss ++ " \n pure () "
330327
331328usedVariables :: forall s . StateModel s => Annotated s -> TestSequence s -> VarContext
332329usedVariables s = go s
Original file line number Diff line number Diff line change @@ -328,7 +328,11 @@ instance Eq (Step state) where
328328-- We also collect a list of names of actions which were generated,
329329-- but were then rejected by their precondition.
330330
331- data Actions state = Actions_ [String ] state (Smart [Step state ])
331+ data Actions state = Actions_
332+ { actionsRejected :: [String ]
333+ , actionsInitialState :: state
334+ , actionsSteps :: Smart [Step state ]
335+ }
332336 deriving (Generic )
333337
334338pattern Actions :: state -> [Step state ] -> Actions state
You can’t perform that action at this time.
0 commit comments