]> git.rkrishnan.org Git - functorrent.git/blobdiff - test/BencodeTests.hs
add a very simple Metainfo test
[functorrent.git] / test / BencodeTests.hs
index d8896437f9c0efc4a051b6536f94077866d8e419..004234d53d3224690b0a08fee293f5c32584db15 100644 (file)
@@ -14,19 +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)
+    it "encode/decode" $ do
+      property $ \bval ->
+        let encoded = encode bval
             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
-  -- describe "Bencode property tests" $ do
-  --   it "encode/decode" $ do
-  --     property $ \bval ->
-  --       let encoded = encode bval
-  --           decoded = decode encoded
-  --       in Right bval == decoded
+        in Right bval == decoded