Make the Arbitrary instance for Text generate full Unicode
Flipping this revealed one genuine codebase bug, but gh-176 may be
related. And as a bonus, this also revealed two testsuite bugs.
That's an impressive haul!
commita4c9375d5f666098de201b7b05ff433570593ad2
authorBryan O'Sullivan <bos@serpentine.com>
dateSat 20 May 2017, 22:11 (9 years ago)
parente825889
tests/Tests/QuickCheckUtils.hs+1−1
@@ -106,7 +106,7 @@ smallArbitrary = sized $ \n -> resize (smallish n) arbitrary
106106 where smallish = round . (sqrt :: Double -> Double) . fromIntegral . abs
107107
108108instance Arbitrary T.Text where
109− arbitrary = T.pack `fmap` arbitrary
109+ arbitrary = T.pack `fmap` string
110110 shrink = map T.pack . shrink . T.unpack
111111
112112instance Arbitrary TL.Text where