blob: f26e67abb593d30cf4ba4f186807e0a48700f7fd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
module Test (
Test(..),
TestStep(..),
ProcName(..), unpackProcName,
NodeName(..), unpackNodeName,
) where
import Data.Text (Text)
import qualified Data.Text as T
import Text.Regex.TDFA
data Test = Test
{ testName :: Text
, testSteps :: [TestStep]
}
data TestStep = Spawn ProcName NodeName
| Send ProcName Text
| Expect ProcName Regex
newtype ProcName = ProcName Text
deriving (Eq, Ord)
unpackProcName :: ProcName -> String
unpackProcName (ProcName tname) = T.unpack tname
newtype NodeName = NodeName Text
deriving (Eq, Ord)
unpackNodeName :: NodeName -> String
unpackNodeName (NodeName tname) = T.unpack tname
|