Fix goodProducer on 32-bit systems
commita35b5570d6d729a38d68e309c3bd92f3138e3833
authorBryan O'Sullivan <bos@serpentine.com>
dateThu 21 Jan 2016, 22:24 (11 years ago)
parent8f2b8a5
tests/UnitTests.hs+5−2
@@ -81,9 +81,12 @@ goodProducer = assertEqual "partial encoding should not explode on undefined"
8181 '{' (L.head (encode wibble))
8282 where
8383 wibble = Wibble {
84− wibbleString = replicate 4030 'a'
85− , wibbleInt = undefined
84+ wibbleString = replicate k 'a'
85+ , wibbleInt = 1
8686 }
87+ k | arch32bit = 4047
88+ | otherwise = 4030
89+ arch32bit = (maxBound :: Int) == 2147483647
8790
8891-- Test decoding various UTC time formats
8992--