packages feed

distributed-process-systest 0.3.2 → 0.4.1

raw patch · 3 files changed

+13/−29 lines, 3 filesdep −rematchdep ~ansi-terminaldep ~randomnew-uploaderPVP ok

version bump matches the API change (PVP)

Dependencies removed: rematch

Dependency ranges changed: ansi-terminal, random

API changes (from Hackage documentation)

- Control.Distributed.Process.SysTest.Utils: expectThat :: a -> Matcher a -> Process ()
- Control.Distributed.Process.SysTest.Utils: shouldBe :: a -> Matcher a -> Process ()
- Control.Distributed.Process.SysTest.Utils: shouldContain :: (Show a, Eq a) => [a] -> a -> Process ()
- Control.Distributed.Process.SysTest.Utils: shouldMatch :: a -> Matcher a -> Process ()
- Control.Distributed.Process.SysTest.Utils: shouldNotContain :: (Show a, Eq a) => [a] -> a -> Process ()

Files

ChangeLog view
@@ -1,3 +1,13 @@+2024-10-30 David Simmons-Duffin <dsd@caltech.edu> 0.4.1++* Bumped dependency bound for ansi-terminal++2024-10-30 Laurent P. René de Cotret <laurent.decotret@outlook.com> 0.4.0++* Removed dependency on `rematch` (#459). This means that certain functions +  are no longer exported: `shouldBe`, `shouldMatch`, `shouldContain`, +  `shouldNotContain`, and `expectThat`.+ 2024-09-03 Laurent P. René de Cotret <laurent.decotret@outlook.com> 0.3.2  * Bumped dependency bounds to support GHC 8.10.7 - GHC 9.10.1
distributed-process-systest.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name:          distributed-process-systest-version:       0.3.2+version:       0.4.1 synopsis:      Cloud Haskell Test Support description:   Testing Frameworks and Capabilities for programs built on Cloud Haskell homepage:      http://github.com/haskell-distributed/distributed-process-systest@@ -32,7 +32,7 @@   import:            warnings   exposed-modules:   Control.Distributed.Process.SysTest.Utils   Build-Depends:     base >= 4.14 && < 5,-                     ansi-terminal >= 0.5 && < 1.1,+                     ansi-terminal >= 0.5 && < 1.2,                      binary >= 0.8 && < 1.0,                      bytestring >= 0.10 && < 0.13,                      distributed-process >= 0.6.1 && < 0.8,@@ -41,7 +41,6 @@                      network-transport >= 0.4.1.0 && < 0.6,                      network >= 2.5 && < 3.3,                      random >= 1.0 && < 1.3,-                     rematch >= 0.1.2.1 && < 0.3,                      test-framework >= 0.6 && < 0.9,                      test-framework-hunit >= 0.2.0 && < 0.4,                      exceptions < 0.11,
src/Control/Distributed/Process/SysTest/Utils.hs view
@@ -19,11 +19,6 @@   -- ping !   , Ping(Ping)   , ping-  , shouldBe-  , shouldMatch-  , shouldContain-  , shouldNotContain-  , expectThat   , synchronisedAssertion   -- test process utilities   , TestProcessControl@@ -77,12 +72,10 @@ import Control.Exception (AsyncException(ThreadKilled)) import Control.Monad (forever) import Control.Monad.STM (atomically)-import Control.Rematch hiding (match)-import Control.Rematch.Run  import Data.Binary import Data.Typeable (Typeable) -import Test.HUnit (Assertion, assertFailure)+import Test.HUnit (Assertion) import Test.HUnit.Base (assertBool)  import GHC.Generics@@ -127,24 +120,6 @@  stash :: TestResult a -> a -> Process () stash mvar x = liftIO $ putMVar mvar x--expectThat :: a -> Matcher a -> Process ()-expectThat a matcher = case res of-  MatchSuccess -> return ()-  (MatchFailure msg) -> liftIO $ assertFailure msg-  where res = runMatch matcher a--shouldBe :: a -> Matcher a -> Process ()-shouldBe = expectThat--shouldContain :: (Show a, Eq a) => [a] -> a -> Process ()-shouldContain xs x = expectThat xs $ hasItem (equalTo x)--shouldNotContain :: (Show a, Eq a) => [a] -> a -> Process ()-shouldNotContain xs x = expectThat xs $ isNot (hasItem (equalTo x))--shouldMatch :: a -> Matcher a -> Process ()-shouldMatch = expectThat  -- | Run the supplied @testProc@ using an @MVar@ to collect and assert -- against its result. Uses the supplied @note@ if the assertion fails.