summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2013-12-16 18:52:04 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2013-12-16 18:52:04 +0400
commited3aace2060792366edeac6cbe3ea415ac6db205 (patch)
tree12c43f8479825ffecd5375db4b2c52cf9aaee989 /tests
parentfa7861cc092fb3d423d6e3c05df36d3651068de8 (diff)
Allow to catch fail :: Get a from pure code
Diffstat (limited to 'tests')
-rw-r--r--tests/properties.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/properties.hs b/tests/properties.hs
index 2e5345f..876b954 100644
--- a/tests/properties.hs
+++ b/tests/properties.hs
@@ -70,3 +70,9 @@ main = hspec $ do
70 70
71 it "generic records" $ property $ 71 it "generic records" $ property $
72 prop_bencodable (T :: T FileInfo) 72 prop_bencodable (T :: T FileInfo)
73
74 describe "Get" $ do
75 it "catchable from pure code" $ do
76 fromDict (fail "fatal error" :: Get Int) (BDict BE.Nil)
77 `shouldBe`
78 Left "fatal error"