diff options
author | Sam Truzjan <pxqr.sta@gmail.com> | 2013-12-16 18:52:04 +0400 |
---|---|---|
committer | Sam Truzjan <pxqr.sta@gmail.com> | 2013-12-16 18:52:04 +0400 |
commit | ed3aace2060792366edeac6cbe3ea415ac6db205 (patch) | |
tree | 12c43f8479825ffecd5375db4b2c52cf9aaee989 /tests | |
parent | fa7861cc092fb3d423d6e3c05df36d3651068de8 (diff) |
Allow to catch fail :: Get a from pure code
Diffstat (limited to 'tests')
-rw-r--r-- | tests/properties.hs | 6 |
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" | ||