on master help sign in
Add a test case for gh-72
commitc2485e3aca2a1056c25bc1ef14d4b25cefd1770f authorBryan O'Sullivan <bos@serpentine.com> dateMon 19 Nov 2012, 20:02 (14 years ago) parent5860f3a
1 file changed+6
tests/Properties.hs+6
tests/Properties.hs+6
@@ -61,6 +61,9 @@ genericToFromJSON x = case G.fromJSON . G.toJSON $ x of
6161 Error _ -> False
6262 Success x' -> x == x'
6363
64+regress_gh72 :: [(String, Maybe String)] -> Bool
65+regress_gh72 ys = G.decode (G.encode m) == Just m
66+ where m = Map.fromList ys
6467
6568data Foo = Foo {
6669 fooInt :: Int
@@ -114,6 +117,9 @@ main = defaultMain tests
114117
115118tests :: [Test]
116119tests = [
120+ testGroup "regression" [
121+ testProperty "gh-72" regress_gh72
122+ ],
117123 testGroup "encode" [
118124 testProperty "encodeDouble" encodeDouble
119125 , testProperty "encodeInteger" encodeInteger