File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
hnix-store-tests/src/Data/Text Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -62,9 +62,7 @@ spec = parallel $ do
6262 prop " Bool" $ roundtripS bool
6363 prop " ByteString" $ roundtripS byteString
6464 prop " Text" $ roundtripS text
65- prop " Maybe Text"
66- $ forAll (arbitrary `suchThat` (/= Just " " ))
67- $ roundtripS maybeText
65+ prop " Maybe Text" $ roundtripS maybeText
6866 prop " UTCTime" $ roundtripS @ UTCTime @ () time
6967
7068 describe " Combinators" $ do
Original file line number Diff line number Diff line change 22module Data.Text.Arbitrary () where
33
44import Data.Text (Text )
5- import Test.QuickCheck (Arbitrary (.. ))
5+ import Test.QuickCheck (Arbitrary (.. ), frequency , suchThat )
66import qualified Data.Text
77
88instance Arbitrary Text where
99 arbitrary = Data.Text. pack <$> arbitrary
1010 shrink xs = Data.Text. pack <$> shrink (Data.Text. unpack xs)
11+
12+ instance {-# OVERLAPPING #-} Arbitrary (Maybe Text ) where
13+ arbitrary = frequency
14+ [ (1 , pure Nothing )
15+ , (3 , Just <$> arbitrary `suchThat` (/= mempty ))
16+ ]
You can’t perform that action at this time.
0 commit comments