on master help sign in
Port tests to binary >= 0.6.0.0.
commit3cebf6c4e478c90f837af013b982d1e19147c515 authorLennart Kolmodin <kolmodin@gmail.com> dateSun 28 Oct 2012, 15:02 (14 years ago) parent2b616b3
1 file changed+2−2
BitsQC.hs+2−2
BitsQC.hs+2−2
@@ -3,7 +3,7 @@
33module Main where
44
55import Data.Binary ( encode, Binary(..) )
6−import Data.Binary.Get ( runGet, runGetPartial, feedLBS, Result(..) )
6+import Data.Binary.Get ( runGet, runGetIncremental, pushChunks, Decoder(..) )
77import Data.Binary.Put ( runPut )
88
99import qualified Data.Binary.Get as BG ( getWord8, getWord16be, getWord32be, getWord64be )
@@ -202,7 +202,7 @@ prop_fail lbs errMsg0 = forAll (choose (0, 8 * L.length lbs)) $ \len ->
202202 p = do getByteString (fromIntegral bytes)
203203 getBits (fromIntegral bits) :: BitGet Word8
204204 fail errMsg0
205− r = runGetPartial (runBitGet p) `feedLBS` lbs
205+ r = runGetIncremental (runBitGet p) `pushChunks` lbs
206206 in case r of
207207 Fail remainingBS pos errMsg ->
208208 and [ L.fromChunks [remainingBS] == L.drop expectedBytesConsumed lbs