Skip to content
Browse files

Add a test case for gh-72

  • Loading branch information...
1 parent f2bb853 commit 80e51475ca66efb9a7c4752d1e3a9c1ffaaf3a4e @bos committed Nov 19, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 tests/Properties.hs
View
6 tests/Properties.hs
@@ -61,6 +61,9 @@ genericToFromJSON x = case G.fromJSON . G.toJSON $ x of
Error _ -> False
Success x' -> x == x'
+regress_gh72 :: [(String, Maybe String)] -> Bool
+regress_gh72 ys = G.decode (G.encode m) == Just m
+ where m = Map.fromList ys
data Foo = Foo {
fooInt :: Int
@@ -114,6 +117,9 @@ main = defaultMain tests
tests :: [Test]
tests = [
+ testGroup "regression" [
+ testProperty "gh-72" regress_gh72
+ ],
testGroup "encode" [
testProperty "encodeDouble" encodeDouble
, testProperty "encodeInteger" encodeInteger

0 comments on commit 80e5147

Please sign in to comment.
Something went wrong with that request. Please try again.