mirror of
https://github.com/haskell-nix/hnix-store.git
synced 2025-01-07 11:51:26 +03:00
Merge request #86: use base16-bytestring >= 1, & updating according tests
This commit is contained in:
commit
4a1c1a2697
@ -39,7 +39,7 @@ library
|
|||||||
build-depends: base >=4.10 && <5
|
build-depends: base >=4.10 && <5
|
||||||
, attoparsec
|
, attoparsec
|
||||||
, algebraic-graphs >= 0.5 && < 0.6
|
, algebraic-graphs >= 0.5 && < 0.6
|
||||||
, base16-bytestring
|
, base16-bytestring >= 1
|
||||||
, base64-bytestring
|
, base64-bytestring
|
||||||
, bytestring
|
, bytestring
|
||||||
, binary
|
, binary
|
||||||
|
@ -88,7 +88,7 @@ spec_nixhash = do
|
|||||||
forM_ samples $ \(b16, b32, b64) -> shouldBe (B16.encode . BSL.toStrict <$> B64.decode b64 ) (Right b16)
|
forM_ samples $ \(b16, b32, b64) -> shouldBe (B16.encode . BSL.toStrict <$> B64.decode b64 ) (Right b16)
|
||||||
|
|
||||||
it "b32 encoded . b16 decoded should equal original b32" $
|
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" $
|
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)
|
||||||
|
Loading…
Reference in New Issue
Block a user