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.
2 parents 15d9246 + 58766a1 commit c8468f3Copy full SHA for c8468f3
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