1 module BencodeTests (tests) where
3 import FuncTorrent.Bencode (encode, decode, BVal(..))
7 import Data.ByteString.Char8 (unpack, pack)
9 propEncodeDecode :: BVal -> Bool
10 propEncodeDecode bval = let encoded = encode bval
11 decoded = decode encoded
12 in Right bval == decoded
16 describe "BVal tests" $ do
17 it "encode/decode" $ do
19 let encoded = encode bval
20 decoded = decode encoded
21 in Right bval == decoded