Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- tests :: TestTree
- partitionProbe :: [(NodeId, a)] -> Map NodeId [a]
- test_blockGenerator :: (MonadDelay m, MonadFork m, MonadTime m, MonadTimer m) => Chain Block -> DiffTime -> m Property
- prop_blockGenerator_ST :: TestBlockChain -> Positive Micro -> Property
- prop_blockGenerator_IO :: TestBlockChain -> Positive Int -> Property
- coreToRelaySim :: (MonadDelay m, MonadFork m, MonadLabelledSTM m, MonadSay m, MonadThrow m, MonadTimer m) => Bool -> Chain Block -> DiffTime -> DiffTime -> DiffTime -> Probe m (NodeId, Chain Block) -> m ()
- data TestNodeSim = TestNodeSim {}
- prop_coreToRelay :: TestNodeSim -> Property
- coreToRelaySim2 :: (MonadDelay m, MonadLabelledSTM m, MonadFork m, MonadThrow m, MonadSay m, MonadTimer m) => Chain Block -> DiffTime -> DiffTime -> DiffTime -> Probe m (NodeId, Chain Block) -> m ()
- prop_coreToRelay2 :: TestNodeSim -> Property
- data TestNetworkGraph = TestNetworkGraph Graph [(Int, Chain Block)]
- connectGraphG :: Graph -> Gen Graph
- networkGraphSim :: (MonadDelay m, MonadLabelledSTM m, MonadFork m, MonadThrow m, MonadSay m, MonadTimer m) => TestNetworkGraph -> DiffTime -> DiffTime -> DiffTime -> Probe m (NodeId, Chain Block) -> m ()
- data NetworkTest = NetworkTest {}
- prop_networkGraph :: NetworkTest -> Property
- isDisconnected :: Graph -> Bool
- arbitraryAcyclicGraph :: Gen Int -> Gen Int -> Float -> Gen Graph
- arbitraryAcyclicGraphSmall :: Gen Graph
- genConnectedBidirectionalGraph :: Gen Graph
- type Probe (m :: Type -> Type) x = StrictTVar m [x]
- withProbe :: MonadSTM m => (Probe m x -> m ()) -> m [x]
- probeOutput :: MonadSTM m => Probe m x -> x -> m ()
Documentation
test_blockGenerator :: (MonadDelay m, MonadFork m, MonadTime m, MonadTimer m) => Chain Block -> DiffTime -> m Property Source #
Block generator should generate blocks in the correct slot time.
:: (MonadDelay m, MonadFork m, MonadLabelledSTM m, MonadSay m, MonadThrow m, MonadTimer m) | |
=> Bool | two way subscription |
-> Chain Block | |
-> DiffTime | slot duration |
-> DiffTime | core transport delay |
-> DiffTime | relay transport delay |
-> Probe m (NodeId, Chain Block) | |
-> m () |
data TestNodeSim Source #
Instances
Arbitrary TestNodeSim Source # | |
Defined in Test.Ouroboros.Network.MockNode arbitrary :: Gen TestNodeSim # shrink :: TestNodeSim -> [TestNodeSim] # | |
Show TestNodeSim Source # | |
Defined in Test.Ouroboros.Network.MockNode showsPrec :: Int -> TestNodeSim -> ShowS # show :: TestNodeSim -> String # showList :: [TestNodeSim] -> ShowS # | |
Eq TestNodeSim Source # | |
Defined in Test.Ouroboros.Network.MockNode (==) :: TestNodeSim -> TestNodeSim -> Bool # (/=) :: TestNodeSim -> TestNodeSim -> Bool # |
:: (MonadDelay m, MonadLabelledSTM m, MonadFork m, MonadThrow m, MonadSay m, MonadTimer m) | |
=> Chain Block | |
-> DiffTime | slot length |
-> DiffTime | core transport delay |
-> DiffTime | relay transport delay |
-> Probe m (NodeId, Chain Block) | |
-> m () |
data TestNetworkGraph Source #
TestNetworkGraph Graph [(Int, Chain Block)] |
Instances
Arbitrary TestNetworkGraph Source # | |
Defined in Test.Ouroboros.Network.MockNode arbitrary :: Gen TestNetworkGraph # shrink :: TestNetworkGraph -> [TestNetworkGraph] # | |
Show TestNetworkGraph Source # | |
Defined in Test.Ouroboros.Network.MockNode showsPrec :: Int -> TestNetworkGraph -> ShowS # show :: TestNetworkGraph -> String # showList :: [TestNetworkGraph] -> ShowS # |
:: (MonadDelay m, MonadLabelledSTM m, MonadFork m, MonadThrow m, MonadSay m, MonadTimer m) | |
=> TestNetworkGraph | |
-> DiffTime | slot duration |
-> DiffTime | core transport delay |
-> DiffTime | relay transport delay |
-> Probe m (NodeId, Chain Block) | |
-> m () |
data NetworkTest Source #
Instances
Arbitrary NetworkTest Source # | |
Defined in Test.Ouroboros.Network.MockNode arbitrary :: Gen NetworkTest # shrink :: NetworkTest -> [NetworkTest] # | |
Show NetworkTest Source # | |
Defined in Test.Ouroboros.Network.MockNode showsPrec :: Int -> NetworkTest -> ShowS # show :: NetworkTest -> String # showList :: [NetworkTest] -> ShowS # |
isDisconnected :: Graph -> Bool Source #
type Probe (m :: Type -> Type) x = StrictTVar m [x] Source #
Where returning results directly is not convenient, we can build up a trace of events we want to observe, and can do probe output from multiple threads.
probeOutput :: MonadSTM m => Probe m x -> x -> m () Source #