diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2025-09-21 22:49:21 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2025-09-21 22:49:21 +0200 |
commit | c558b300a3353edf7c88a2c363cb6bc7b7c1dcb7 (patch) | |
tree | f8a21828219592a2a23289be74c7faaa95f8e3d0 /src/Test.hs | |
parent | 442bc3df9692edde632e3a1d7217e861bf85fd81 (diff) |
Diffstat (limited to 'src/Test.hs')
-rw-r--r-- | src/Test.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Test.hs b/src/Test.hs index 1481b2b..9ba185b 100644 --- a/src/Test.hs +++ b/src/Test.hs @@ -12,7 +12,7 @@ import Control.Monad.Reader import Data.Bifunctor import Data.Scientific -import Data.Text (Text) +import Data.Text (Text, pack) import Data.Typeable import Network @@ -57,7 +57,7 @@ data TestStep a where PacketLoss :: Scientific -> Node -> TestStep a -> TestStep a Wait :: TestStep () -instance Typeable a => ExprType (TestBlock a) where +instance ExprType a => ExprType (TestBlock a) where textExprType _ = "test block" textExprValue _ = "<test block>" @@ -67,6 +67,9 @@ data MultiplyTimeout = MultiplyTimeout Scientific instance ObjectType TestRun MultiplyTimeout where type ConstructorArgs MultiplyTimeout = Scientific + textObjectType _ _ = "MultiplyTimeout" + textObjectValue _ (MultiplyTimeout x) = pack (show x) <> "@MultiplyTimeout" + createObject oid timeout | timeout >= 0 = do var <- asks (teTimeout . fst) |