From 3358405aa30d370753800026cab44c5a23889077 Mon Sep 17 00:00:00 2001 From: KtorZ Date: Wed, 6 Mar 2019 14:05:42 +0100 Subject: [PATCH] put test data in a dedicated namespace 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. --- .../{block-1 => Cardano/Wallet/BinarySpec-block-1} | Bin .../{block-2 => Cardano/Wallet/BinarySpec-block-2} | Bin .../{block-3 => Cardano/Wallet/BinarySpec-block-3} | Bin .../Wallet/BinarySpec-block-header-1} | Bin test/unit/Cardano/Wallet/BinarySpec.hs | 8 ++++---- 5 files changed, 4 insertions(+), 4 deletions(-) rename test/data/{block-1 => Cardano/Wallet/BinarySpec-block-1} (100%) rename test/data/{block-2 => Cardano/Wallet/BinarySpec-block-2} (100%) rename test/data/{block-3 => Cardano/Wallet/BinarySpec-block-3} (100%) rename test/data/{block-header-1 => Cardano/Wallet/BinarySpec-block-header-1} (100%) diff --git a/test/data/block-1 b/test/data/Cardano/Wallet/BinarySpec-block-1 similarity index 100% rename from test/data/block-1 rename to test/data/Cardano/Wallet/BinarySpec-block-1 diff --git a/test/data/block-2 b/test/data/Cardano/Wallet/BinarySpec-block-2 similarity index 100% rename from test/data/block-2 rename to test/data/Cardano/Wallet/BinarySpec-block-2 diff --git a/test/data/block-3 b/test/data/Cardano/Wallet/BinarySpec-block-3 similarity index 100% rename from test/data/block-3 rename to test/data/Cardano/Wallet/BinarySpec-block-3 diff --git a/test/data/block-header-1 b/test/data/Cardano/Wallet/BinarySpec-block-header-1 similarity index 100% rename from test/data/block-header-1 rename to test/data/Cardano/Wallet/BinarySpec-block-header-1 diff --git a/test/unit/Cardano/Wallet/BinarySpec.hs b/test/unit/Cardano/Wallet/BinarySpec.hs index dc8ca4855f8..e1bc4b3d357 100644 --- a/test/unit/Cardano/Wallet/BinarySpec.hs +++ b/test/unit/Cardano/Wallet/BinarySpec.hs @@ -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