Skip to content
This repository has been archived by the owner on Jun 18, 2021. It is now read-only.

Commit

Permalink
export toStateMachine from Test.StateMachine.Lockstep.{NAry,Simple}
Browse files Browse the repository at this point in the history
The immediate motivation for this is to get access to `forAllCommands`,
to facilitate labeling of test cases.

Signed-off-by: Douglas Wilson <douglas.wilson@gmail.com>
  • Loading branch information
duog committed May 11, 2021
1 parent 3cbf466 commit 8d44754
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Test/StateMachine/Lockstep/NAry.hs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ module Test.StateMachine.Lockstep.NAry (
-- * Running the tests
, prop_sequential
, prop_parallel
-- * Translate to state machine model
, toStateMachine
) where

import Data.Functor.Classes
Expand Down
5 changes: 5 additions & 0 deletions src/Test/StateMachine/Lockstep/Simple.hs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ module Test.StateMachine.Lockstep.Simple (
, prop_parallel
-- * Translate to n-ary model model
, fromSimple
-- * Translate to state machine model
, toStateMachine
) where

import Data.Bifunctor
Expand Down Expand Up @@ -223,6 +225,9 @@ fromSimple StateMachineTest{..} = NAry.StateMachineTest {
, cleanup = cleanup . modelToSimple
}

toStateMachine :: StateMachineTest t
-> StateMachine (Model t) (At (Cmd t)) (RealMonad t) (At (Resp t))
toStateMachine = NAry.toStateMachine . fromSimple
{-------------------------------------------------------------------------------
Running the tests
-------------------------------------------------------------------------------}
Expand Down

0 comments on commit 8d44754

Please sign in to comment.