Merge request #86: use base16-bytestring >= 1, & updating according tests

This commit is contained in:
Anton Latukha 2020-12-14 11:47:06 +02:00 committed by GitHub
commit 4a1c1a2697
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -39,7 +39,7 @@ library
build-depends: base >=4.10 && <5
, attoparsec
, algebraic-graphs >= 0.5 && < 0.6
, base16-bytestring
, base16-bytestring >= 1
, base64-bytestring
, bytestring
, binary

View File

@ -88,7 +88,7 @@ spec_nixhash = do
forM_ samples $ \(b16, b32, b64) -> shouldBe (B16.encode . BSL.toStrict <$> B64.decode b64 ) (Right b16)
it "b32 encoded . b16 decoded should equal original b32" $
forM_ samples $ \(b16, b32, b64) -> shouldBe (encode $ fst $ B16.decode b16 ) b32
forM_ samples $ \(b16, b32, b64) -> shouldBe (encode <$> B16.decode b16) (Right b32)
it "b64 encoded . b16 decoded should equal original b64" $
forM_ samples $ \(b16, b32, b64) -> shouldBe (B64.encode $ BSL.fromStrict $ fst $ B16.decode b16 ) b64
forM_ samples $ \(b16, b32, b64) -> shouldBe (B64.encode . BSL.fromStrict <$> B16.decode b16 ) (Right b64)