From: Ramakrishnan Muthukrishnan Date: Mon, 24 Jul 2017 02:19:46 +0000 (+0530) Subject: BencodeTest: Just the encode/decode test for BVal should be enough X-Git-Url: https://git.rkrishnan.org/components/com_hotproperty/flags/simplejson/statistics?a=commitdiff_plain;h=50dfd16506421bdacf13550ce9020875e9f49b4a;p=functorrent.git BencodeTest: Just the encode/decode test for BVal should be enough --- diff --git a/test/BencodeTests.hs b/test/BencodeTests.hs index 8e54e93..004234d 100644 --- a/test/BencodeTests.hs +++ b/test/BencodeTests.hs @@ -14,23 +14,8 @@ propEncodeDecode bval = let encoded = encode bval tests :: IO () tests = hspec $ do describe "BVal tests" $ do - it "encode/decode bstr tests" $ do - property $ \s -> - let encoded = encode (Bstr s) - decoded = decode encoded - in Right (Bstr s) == decoded - it "encode/decode bint tests" $ do - property $ \i -> - let encoded = encode (Bint i) - decoded = decode encoded - in Right (Bint i) == decoded - it "encode/decode blist tests" $ do + it "encode/decode" $ do property $ \bval -> - let encoded = encode (Blist (take 1 bval)) + let encoded = encode bval decoded = decode encoded - in Right (Blist (take 1 bval)) == decoded - -- it "encode/decode" $ do - -- property $ \bval -> - -- let encoded = encode bval - -- decoded = decode encoded - -- in Right bval == decoded + in Right bval == decoded