We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 15d9246 commit 58766a1Copy full SHA for 58766a1
tests/PropUtils.hs
@@ -51,8 +51,9 @@ import qualified Data.Aeson.Decoding as Dec
51
52
encodeDouble :: Double -> Double -> Property
53
encodeDouble num denom
54
- | isInfinite d || isNaN d = encode d === "null"
55
- | otherwise = (read . L.unpack . encode) d === d
+ | isNaN d = encode d === "null"
+ | isInfinite d = if d > 0 then encode d === "\"+inf\"" else encode d === "\"-inf\""
56
+ | otherwise = (read . L.unpack . encode) d === d
57
where d = num / denom
58
59
encodeInteger :: Integer -> Property
0 commit comments