Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit 99b1287

Browse files
committed
Decrease the frequency of newlines & carriage returns.
1 parent e9eecdd commit 99b1287

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/Data/Source/Spec.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,5 +101,5 @@ insetRange Range {..} = Range (succ start) (pred end)
101101

102102

103103
instance QC.Arbitrary Source where
104-
arbitrary = fromText . Text.pack <$> QC.listOf (QC.oneof [ pure '\r', pure '\n', QC.arbitraryUnicodeChar ])
104+
arbitrary = fromText . Text.pack <$> QC.listOf (QC.frequency [ (1, pure '\r'), (1, pure '\n'), (20, QC.arbitraryUnicodeChar) ])
105105
shrink src = fromText . Text.pack <$> QC.shrinkList QC.shrinkNothing (Text.unpack (toText src))

test/Generators.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ import qualified Data.Source
99
import Data.Functor.Identity
1010

1111
source :: (GenBase m ~ Identity, MonadGen m) => Hedgehog.Range Int -> m Data.Source.Source
12-
source r = Data.Source.fromUTF8 <$> Gen.utf8 r (Gen.choice [pure '\r', pure '\n', Gen.unicode])
12+
source r = Data.Source.fromUTF8 <$> Gen.utf8 r (Gen.frequency [ (1, pure '\r'), (1, pure '\n'), (20, Gen.unicode) ])

0 commit comments

Comments
 (0)