Skip to content

Commit

Permalink
Merge request #86: use base16-bytestring >= 1, & updating according t…
Browse files Browse the repository at this point in the history
…ests
  • Loading branch information
Anton-Latukha authored Dec 14, 2020
2 parents bb2a91c + 9126129 commit 4a1c1a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hnix-store-core/hnix-store-core.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions hnix-store-core/tests/Hash.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 4a1c1a2

Please sign in to comment.