Skip to content

Commit

Permalink
added noShrink to write_read because shrinking takes forever on type …
Browse files Browse the repository at this point in the history
…[Text]
  • Loading branch information
BebeSparkelSparkel committed May 23, 2024
1 parent 8e2c9aa commit 13f5ed1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/Tests/QuickCheckUtils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import Data.Text.Foreign (I8)
import Data.Text.Lazy.Builder.RealFloat (FPFormat(..))
import Data.Word (Word8, Word16)
import GHC.IO.Encoding.Types (TextEncoding(TextEncoding,textEncodingName))
import Test.QuickCheck (Arbitrary(..), arbitraryUnicodeChar, arbitraryBoundedEnum, getUnicodeString, arbitrarySizedIntegral, shrinkIntegral, Property, ioProperty, discard, counterexample, scale, (.&&.), NonEmptyList(..), forAll, getPositive)
import Test.QuickCheck (Arbitrary(..), arbitraryUnicodeChar, arbitraryBoundedEnum, getUnicodeString, arbitrarySizedIntegral, shrinkIntegral, Property, ioProperty, discard, counterexample, scale, (.&&.), NonEmptyList(..), forAll, getPositive, noShrinking)
import Test.QuickCheck.Gen (Gen, choose, chooseAny, elements, frequency, listOf, oneof, resize, sized)
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.QuickCheck (testProperty)
Expand Down Expand Up @@ -258,9 +258,9 @@ write_read :: forall a b c.
-> [TestTree]
write_read unline filt writer reader modData
= encodings <&> \enc@TextEncoding {textEncodingName} -> testGroup textEncodingName
[ testProperty "NoBuffering" $ propTest enc (pure IO.NoBuffering)
, testProperty "LineBuffering" $ propTest enc (pure IO.LineBuffering)
, testProperty "BlockBuffering" $ propTest enc blockBuffering
[ testProperty "NoBuffering" $ noShrinking $ propTest enc (pure IO.NoBuffering)
, testProperty "LineBuffering" $ noShrinking $ propTest enc (pure IO.LineBuffering)
, testProperty "BlockBuffering" $ noShrinking $ propTest enc blockBuffering
]
where
propTest :: TextEncoding -> Gen IO.BufferMode -> IO.NewlineMode -> c -> Property
Expand Down

0 comments on commit 13f5ed1

Please sign in to comment.