Skip to content

Commit 1906833

Browse files
committed
Fix test suite warnings
1 parent 440fdb3 commit 1906833

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

tests/Instances.hs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ import Control.Monad
1616
import Data.Aeson.Types
1717
import Data.Function (on)
1818
import Data.Functor.Compose (Compose (..))
19-
import Data.Functor.Identity (Identity (..))
20-
import Data.Hashable (Hashable (..))
2119
import Data.Proxy (Proxy(..))
2220
import Data.Tagged (Tagged(..))
2321
import Data.Time (ZonedTime(..), TimeZone(..))
@@ -31,8 +29,8 @@ import qualified Data.UUID.Types as UUID
3129

3230
#if !MIN_VERSION_QuickCheck(2,9,0)
3331
import Control.Applicative (Const(..))
34-
import Data.List.NonEmpty (NonEmpty(..))
3532
import Data.Functor.Identity (Identity (..))
33+
import Data.List.NonEmpty (NonEmpty(..))
3634
import Data.Version
3735
import Test.QuickCheck (getNonNegative, listOf1, resize)
3836
#endif

tests/UnitTests.hs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module UnitTests
1717
import Prelude ()
1818
import Prelude.Compat
1919

20-
import Control.Monad (forM, forM_, unless)
20+
import Control.Monad (forM, forM_)
2121
import Data.Aeson ((.=), (.:), (.:?), (.:!), FromJSON(..), FromJSONKeyFunction(..), FromJSONKey(..), ToJSON1(..), decode, eitherDecode, encode, genericToEncoding, genericToJSON, object, withObject)
2222
import Data.Aeson.Internal (JSONPathElement(..), formatError)
2323
import Data.Aeson.TH (deriveJSON, deriveToJSON, deriveToJSON1)
@@ -36,8 +36,7 @@ import Data.Time.Format (parseTime)
3636
import Data.Time.Locale.Compat (defaultTimeLocale)
3737
import GHC.Generics (Generic)
3838
import Instances ()
39-
import System.Directory (doesDirectoryExist, getDirectoryContents)
40-
import System.Exit (exitWith, ExitCode(ExitFailure))
39+
import System.Directory (getDirectoryContents)
4140
import System.FilePath ((</>), takeExtension, takeFileName)
4241
import Test.Framework (Test, testGroup)
4342
import Test.Framework.Providers.HUnit (testCase)
@@ -424,7 +423,6 @@ jsonTestSuiteTest path = testCase fileName $ do
424423
jsonTestSuite :: IO Test
425424
jsonTestSuite = do
426425
let suitePath = "tests/JSONTestSuite"
427-
exists <- doesDirectoryExist suitePath
428426
let suites = ["test_parsing", "test_transform"]
429427
testPaths <- fmap (sort . concat) . forM suites $ \suite -> do
430428
let dir = suitePath </> suite

0 commit comments

Comments
 (0)