Copyright | (c) Andrey Mulik 2019 |
---|---|
License | BSD-style |
Maintainer | work.a.mulik@gmail.com |
Portability | non-portable (requires non-portable modules) |
Safe Haskell | None |
Language | Haskell2010 |
Test.SDP.Gen
provides newtypes for QuickCheck.
Common newtypes for QuickCheck
Short is newtype of short data structures [0, 100) in QuickCheck properties.
Short is the equivalent of the standard Arbitrary definition:
arbitrary = fromList <$> arbitrary
.
Short a |
Medium is newtype of medium data structures in QuickCheck properties. The Arbitrary Medium instance must create a random-sized structure from the range [100, 1024).
Medium is useful in testing as a compromise between speed and reliability: structures are too short for stress tests, but still human readable and enough fast for auto-testing.
Medium a |
Long is newtype of large data structures (>= 1024) in QuickCheck properties. Since Large can generate really huge numbers, the maximum length is limited by 16384 - [1024, 16384).
Long is primarily intended for benchmarks, although a large range of lengths makes them not very convenient for a pure comparison of several algorithms (but for this can be used vector[Of] and generate). Long works well with Unrolled and ByteList, since only the shortest of the allowed structures may fit in one standard chunk (1024 elements).
Long a |