git.iko.soy/servant-quickcheck
on master help sign in
base-compat for tests.
c5172a1Julian K. Arni
servant-quickcheck.cabal+3−1
@@ -68,12 +68,13 @@ library
68
68
69test-suite spec
69test-suite spec
70 type: exitcode-stdio-1.0
70 type: exitcode-stdio-1.0
71− ghc-options: -Wall -O2 -threaded
71+ ghc-options: -Wall -threaded
72 default-language: Haskell2010
72 default-language: Haskell2010
73 hs-source-dirs: test
73 hs-source-dirs: test
74 main-is: Spec.hs
74 main-is: Spec.hs
75 other-modules: Servant.QuickCheck.InternalSpec
75 other-modules: Servant.QuickCheck.InternalSpec
76 build-depends: base == 4.*
76 build-depends: base == 4.*
77+ , base-compat
77 , servant-quickcheck
78 , servant-quickcheck
78 , hspec
79 , hspec
79 , http-client
80 , http-client
@@ -88,5 +89,6 @@ test-suite spec
88 , FlexibleInstances
89 , FlexibleInstances
89 , FlexibleContexts
90 , FlexibleContexts
90 , DataKinds
91 , DataKinds
92+ , NoImplicitPrelude
91 if flag(long-tests)
93 if flag(long-tests)
92 cpp-options: -DLONG_TESTS
94 cpp-options: -DLONG_TESTS
test/Servant/QuickCheck/InternalSpec.hs+12−12
@@ -1,18 +1,18 @@
1−{-# LANGUAGE CPP #-}
1+{-# LANGUAGE CPP #-}
2{-# LANGUAGE ScopedTypeVariables #-}
2{-# LANGUAGE ScopedTypeVariables #-}
3module Servant.QuickCheck.InternalSpec (spec) where
3module Servant.QuickCheck.InternalSpec (spec) where
4
4
5−import Control.Concurrent.MVar (newMVar, readMVar, swapMVar)
5+import Control.Concurrent.MVar (newMVar, readMVar,
6+ swapMVar)
6−import Control.Monad.IO.Class (liftIO)
7+import Control.Monad.IO.Class (liftIO)
7−import Data.Proxy
8+import Prelude.Compat
8−import Servant
9+import Servant
9−import Test.Hspec
10−import Test.QuickCheck
11−import Servant.API.Internal.Test.ComprehensiveAPI
10+import Servant.API.Internal.Test.ComprehensiveAPI (comprehensiveAPI)
11+import Test.Hspec (Spec, describe, it,
12+ shouldBe)
12
13
13−import Servant.QuickCheck
14+import Servant.QuickCheck
14−
15−import Servant.QuickCheck.Internal (genRequest, serverDoesntSatisfy)
15+import Servant.QuickCheck.Internal (genRequest, serverDoesntSatisfy)
16
16
17spec :: Spec
17spec :: Spec
18spec = do
18spec = do
@@ -79,7 +79,7 @@ ctx = BasicAuthCheck (const . return $ NoSuchUser) :. EmptyContext
79------------------------------------------------------------------------------
79------------------------------------------------------------------------------
80
80
81args :: Args
81args :: Args
82−args = stdArgs { maxSuccess = noOfTestCases }
82+args = defaultArgs { maxSuccess = noOfTestCases }
83
83
84noOfTestCases :: Int
84noOfTestCases :: Int
85#if LONG_TESTS
85#if LONG_TESTS