Skip to content

Commit

Permalink
put test data in a dedicated namespace
Browse files Browse the repository at this point in the history
I am afraid that if there's no clear 'architecture' for data, this
folder will rapidly become a mess. These data are strictly related
to the BinarySpec so, let's make it obvious from the folder
architecture and the file names.
  • Loading branch information
KtorZ committed Mar 6, 2019
1 parent 759c5ee commit 3358405
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 4 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions test/unit/Cardano/Wallet/BinarySpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,22 @@ spec :: Spec
spec = do
describe "Decoding blocks" $ do
it "should decode a block header" $ do
bs <- L8.readFile "test/data/block-header-1"
bs <- L8.readFile "test/data/Cardano/Wallet/BinarySpec-block-header-1"
let decoded = unsafeDeserialiseFromBytes decodeBlockHeader bs
decoded `shouldBe` blockHeader1

it "should decode a block without transactions" $ do
bs <- L8.readFile "test/data/block-1"
bs <- L8.readFile "test/data/Cardano/Wallet/BinarySpec-block-1"
let decoded = unsafeDeserialiseFromBytes decodeBlock bs
decoded `shouldBe` block1

it "should decode a block with transactions" $ do
bs <- L8.readFile "test/data/block-2"
bs <- L8.readFile "test/data/Cardano/Wallet/BinarySpec-block-2"
let decoded = unsafeDeserialiseFromBytes decodeBlock bs
decoded `shouldBe` block2

it "should decode a testnet block with a transaction" $ do
bs <- L8.readFile "test/data/block-3"
bs <- L8.readFile "test/data/Cardano/Wallet/BinarySpec-block-3"
let decoded = unsafeDeserialiseFromBytes decodeBlock bs
decoded `shouldBe` block3

Expand Down

0 comments on commit 3358405

Please sign in to comment.