Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
genTrulyUncheckedStrictByteString :: Gen ByteString Source #
WARNING: Unchecked ByteStrings are seriously broken.
The pointer may still point to something which is fine, but the offset and length will most likely be complete nonsense. This will most-likely lead to segfaults.
This means that genUnchecked
will generate seriously broken ByteString
values.
This is intended. If you need valid ByteString
values, use GenValid
instead.
Make sure to not use any test suite combinators or property combinators that involve
GenInvalid
(like genValiditySpec
) on types that contain ByteString
values.
genTrulyUncheckedLazyByteString :: Gen ByteString Source #
WARNING: Unchecked ByteStrings are seriously broken.
Orphan instances
(TypeError (Text "The GenUnchecked Data.ByteString.Lazy.ByteString is disabled:" :$$: Text "Do not instantiate GenUnchecked, instantiate GenValid instead") :: Constraint) => GenUnchecked ByteString Source # | |
genUnchecked :: Gen ByteString # shrinkUnchecked :: ByteString -> [ByteString] # | |
GenUnchecked ShortByteString Source # | |
(TypeError (Text "The GenUnchecked Data.ByteString.ByteString is disabled:" :$$: Text "Do not instantiate GenUnchecked, instantiate GenValid instead") :: Constraint) => GenUnchecked ByteString Source # | |
genUnchecked :: Gen ByteString # shrinkUnchecked :: ByteString -> [ByteString] # | |
GenValid ByteString Source # | |
genValid :: Gen ByteString # shrinkValid :: ByteString -> [ByteString] # | |
GenValid ShortByteString Source # | |
GenValid ByteString Source # | genValid = SB.pack <$> genValid shrinkValid = fmap SB.pack . shrinkValid . SB.unpack |
genValid :: Gen ByteString # shrinkValid :: ByteString -> [ByteString] # |