-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Tests and test support tools for distributed-process.
--   
--   Tests and test suite for Cloud Haskell libraries.
@package distributed-process-tests
@version 0.4.11


-- | This module provides basic building blocks for testing Cloud Haskell
--   programs.
module Control.Distributed.Process.Tests.Internal.Utils

-- | A mutable cell containing a test result.
type TestResult a = MVar a

-- | A simple <tt>Ping</tt> signal
data Ping
Ping :: Ping
ping :: ProcessId -> Process ()
shouldBe :: a -> Matcher a -> Process ()
shouldMatch :: a -> Matcher a -> Process ()
shouldContain :: (Show a, Eq a) => [a] -> a -> Process ()
shouldNotContain :: (Show a, Eq a) => [a] -> a -> Process ()
expectThat :: a -> Matcher a -> Process ()
synchronisedAssertion :: Eq a => String -> LocalNode -> a -> (TestResult a -> Process ()) -> MVar () -> Assertion

-- | Control signals used to manage <i>test processes</i>
data TestProcessControl

-- | Starts a test process on the local node.
startTestProcess :: Process () -> Process ProcessId

-- | Runs a <i>test process</i> around the supplied <tt>proc</tt>, which is
--   executed whenever the outer process loop receives a <a>Go</a> signal.
runTestProcess :: Process () -> Process ()

-- | Tell a <i>test process</i> to continue executing
testProcessGo :: ProcessId -> Process ()

-- | Tell a <i>test process</i> to stop (i.e., <a>terminate</a>)
testProcessStop :: ProcessId -> Process ()

-- | Tell a <i>test process</i> to send a report (message) back to the
--   calling process
testProcessReport :: ProcessId -> Process ()

-- | Run the supplied <tt>testProc</tt> using an <tt>MVar</tt> to collect
--   and assert against its result. Uses the supplied <tt>note</tt> if the
--   assertion fails.
delayedAssertion :: (Eq a) => String -> LocalNode -> a -> (TestResult a -> Process ()) -> Assertion

-- | Takes the value of <tt>mv</tt> (using <tt>takeMVar</tt>) and asserts
--   that it matches <tt>a</tt>
assertComplete :: (Eq a) => String -> MVar a -> a -> IO ()
data Logger

-- | Create a new Logger. Logger uses a <a>TQueue</a> to receive and
--   process messages on a worker thread.
newLogger :: IO Logger

-- | Send a message to the Logger
putLogMsg :: Logger -> String -> Process ()

-- | Stop the worker thread for the given Logger
stopLogger :: Logger -> IO ()
tryRunProcess :: LocalNode -> Process () -> IO ()
tryForkProcess :: LocalNode -> Process () -> IO ProcessId

-- | Does exactly what it says on the tin, doing so in the <tt>Process</tt>
--   monad.
noop :: Process ()
stash :: TestResult a -> a -> Process ()
instance GHC.Generics.Generic Control.Distributed.Process.Tests.Internal.Utils.TestProcessControl
instance GHC.Show.Show Control.Distributed.Process.Tests.Internal.Utils.Ping
instance GHC.Classes.Eq Control.Distributed.Process.Tests.Internal.Utils.Ping
instance GHC.Generics.Generic Control.Distributed.Process.Tests.Internal.Utils.Ping
instance Data.Binary.Class.Binary Control.Distributed.Process.Tests.Internal.Utils.TestProcessControl
instance Data.Binary.Class.Binary Control.Distributed.Process.Tests.Internal.Utils.Ping

module Network.Transport.Test

-- | Extra operations required of transports for the purposes of testing.
data TestTransport
TestTransport :: Transport -> (EndPointAddress -> EndPointAddress -> IO ()) -> TestTransport

-- | The transport to use for testing.
[testTransport] :: TestTransport -> Transport

-- | IO action to perform to simulate losing a connection.
[testBreakConnection] :: TestTransport -> EndPointAddress -> EndPointAddress -> IO ()

module Control.Distributed.Process.Tests.Tracing
tests :: TestTransport -> IO [Test]

module Control.Distributed.Process.Tests.Stats
tests :: TestTransport -> IO [Test]


-- | XXX test doesn't work, because failure exceptions don't get
--   propagated. The test always claims to succeed, even if it failed.
module Control.Distributed.Process.Tests.Receive
tests :: TestTransport -> IO [Test]

module Control.Distributed.Process.Tests.Mx
tests :: TestTransport -> IO [Test]
instance GHC.Classes.Eq Control.Distributed.Process.Tests.Mx.Publish
instance GHC.Generics.Generic Control.Distributed.Process.Tests.Mx.Publish
instance Data.Binary.Class.Binary Control.Distributed.Process.Tests.Mx.Publish

module Control.Distributed.Process.Tests.Closure
tests :: TestTransport -> IO [Test]

module Control.Distributed.Process.Tests.CH
tests :: TestTransport -> IO [Test]
instance GHC.Show.Show Control.Distributed.Process.Tests.CH.Pong
instance Data.Binary.Class.Binary Control.Distributed.Process.Tests.CH.Pong
instance GHC.Show.Show Control.Distributed.Process.Tests.CH.Ping
instance Data.Binary.Class.Binary Control.Distributed.Process.Tests.CH.Ping
instance Data.Binary.Class.Binary Control.Distributed.Process.Tests.CH.DivByZero
instance Data.Binary.Class.Binary Control.Distributed.Process.Tests.CH.Divide
instance Data.Binary.Class.Binary Control.Distributed.Process.Tests.CH.Add
