Skip to content
Snippets Groups Projects
Commit 7c815142 authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

hlint

parent 78ddd790
Branches
No related tags found
No related merge requests found
...@@ -10,9 +10,13 @@ import Data.ByteString.Base32 ...@@ -10,9 +10,13 @@ import Data.ByteString.Base32
( encodeBase32Unpadded ( encodeBase32Unpadded
) )
import System.IO import System.IO
( hClose ( SeekMode(AbsoluteSeek)
, IOMode(ReadMode, ReadWriteMode)
, Handle
, hClose
, hFlush , hFlush
, hSeek , hSeek
, withBinaryFile
) )
import System.IO.Temp import System.IO.Temp
( withSystemTempFile ( withSystemTempFile
...@@ -45,6 +49,8 @@ import Data.IORef ...@@ -45,6 +49,8 @@ import Data.IORef
import Types import Types
( Parameters(..) ( Parameters(..)
, Size
, Required
) )
import Upload import Upload
...@@ -52,13 +58,6 @@ import Upload ...@@ -52,13 +58,6 @@ import Upload
, adjustSegmentSize , adjustSegmentSize
) )
import System.IO
( SeekMode(AbsoluteSeek)
, IOMode(ReadMode, ReadWriteMode)
, Handle
, withBinaryFile
)
tests :: TestTree tests :: TestTree
tests = testGroup "Upload" tests = testGroup "Upload"
[ testConvergence [ testConvergence
...@@ -88,16 +87,17 @@ testAdjustSegmentSize = testGroup "adjustSegmentSize" ...@@ -88,16 +87,17 @@ testAdjustSegmentSize = testGroup "adjustSegmentSize"
assertEqual "" (p 131073 3) (adjustSegmentSize (p 131072 3) 104857600) assertEqual "" (p 131073 3) (adjustSegmentSize (p 131072 3) 104857600)
] ]
where where
p segmentSize required = Parameters segmentSize 5 4 required p :: Size -> Required -> Parameters
p segmentSize = Parameters segmentSize 5 4
testConvergence :: TestTree testConvergence :: TestTree
testConvergence = testGroup "Convergence" testConvergence = testGroup "Convergence"
[ testCase "getConvergentKey short data" $ [ testCase "getConvergentKey short data" $
(uncurry verifyConvergentKey) short uncurry verifyConvergentKey short
, testCase "getConvergentKey medium data" $ , testCase "getConvergentKey medium data" $
(uncurry verifyConvergentKey) medium uncurry verifyConvergentKey medium
, testCase "getConvergentKey long data" $ , testCase "getConvergentKey long data" $
(uncurry verifyConvergentKey) long uncurry verifyConvergentKey long
] ]
where where
-- --
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment