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