relational-query 0.3.0.0 → 0.3.0.1
raw patch · 3 files changed
+8/−40 lines, 3 filesdep +cabal-test-compatPVP ok
version bump matches the API change (PVP)
Dependencies added: cabal-test-compat
API changes (from Hackage documentation)
Files
- relational-query.cabal +2/−1
- test/SQLs.hs +3/−2
- test/Tool.hs +3/−37
relational-query.cabal view
@@ -1,5 +1,5 @@ name: relational-query-version: 0.3.0.0+version: 0.3.0.1 synopsis: Typeful, Modular, Relational, algebraic query engine description: This package contiains typeful relation structure and relational-algebraic query building DSL which can@@ -84,6 +84,7 @@ test-suite SQLs build-depends: base <5 , Cabal+ , cabal-test-compat , relational-query type: detailed-0.9
test/SQLs.hs view
@@ -1,6 +1,7 @@ module SQLs (tests) where import Distribution.TestSuite (Test)+import Distribution.TestSuite.Compat (TestList, testList) import Tool (eqShow) import Model@@ -111,6 +112,6 @@ _p_maybes = mapM_ print [show justX, show maybeX] -tests :: IO [Test]+tests :: TestList tests =- return $ concat [base, directJoins, join3s, maybes]+ testList $ concat [base, directJoins, join3s, maybes]
test/Tool.hs view
@@ -1,48 +1,14 @@ module Tool (- prop, eq, eqShow, ) where --- import Control.Exception (try)--import Distribution.TestSuite- (Test (Test), TestInstance (TestInstance),- Result (Pass, Fail), Progress (Finished))---noOption :: String -> IO Progress -> Test-noOption name p = Test this where- this = TestInstance p name [] [] (\_ _ -> Right this)--simple :: String -> IO Result -> Test-simple name = noOption name . fmap Finished---boolResult :: Bool -> String -> Result-boolResult b msg- | b = Pass- | otherwise = Fail msg--prop :: String -> Bool -> String -> Test-prop name b = simple name . return . boolResult b+import Distribution.TestSuite (Test)+import Distribution.TestSuite.Compat (prop') eq :: Eq b => String -> (a -> b) -> a -> b -> String -> Test-eq name t x est = prop name (t x == est)+eq name t x est em = prop' name (Just em) (t x == est) eqShow :: Show a => String -> a -> String -> Test eqShow name x est = eq name show x est $ unwords [show x, "/=", est]--{--boolIoResult :: IO Bool -> String -> IO Result-boolIoResult iob msg = do- eb <- try iob- return $ case eb :: Either IOError Bool of- Right True -> Pass- Right False -> Fail msg- Left e -> Error $ show e--propIO :: String -> IO Bool -> String -> Test-propIO name iob = simple name . boolIoResult iob- -}