FsCheck


FsCheck Namespace

Type/Module Description

Arb

Arbitrary<'a>

ArbitraryExtensions

Extensons to transform Arbitrary instances into other Arbitrary instances.

ArbPatterns

Check

CheckExtensions

Command

Command<'Actual, 'Model>

A single command describes pre and post conditions and the model for a single method under test. The post-conditions are the invariants that will be checked; when these do not hold the test fails.

CommandExtensions

Config

For configuring a run.

Configuration

Configure the test run with a quick configuration.

DoNotShrink<'a>

Use the generator for 'a, but don't shrink.

DoNotSize<'a>

Whereas most types are restricted by a size that grows as the test gets further, by applying this type the underlying type will ignore this size and always generate from the full range. Note that this only makes a difference for types that have a range - currently integer types, TimeSpan and Decimal have DoNotSize Arbitrary instances. This is typically (and at least currently) only applicable for value types that are comparable, hence the type constraints.

FixedLengthArray<'a>

Represents an array whose length does not change when shrinking.

Function<'a, 'b>

A function (F# function) that can be displayed and shrunk.

Gen

Combinators to build custom random generators for any type.

Gen<'a>

Generator of a random value, based on a size parameter and a randomly generated int.

GenBuilder

Computation expression builder for Gen.

GenExtensions

Extension methods to build generators - contains among other the Linq methods.

HostName

ICommandGenerator<'Actual, 'Model>

Defines the initial state for actual and model object, and allows to define the generator to use for the next state, based on the model.

Interval

Represents an integer interval.

IntWithMinMax

Represents an int that can include int.MinValue and int.MaxValue.

IPv4Address

IPv6Address

IRunner

For implementing your own test runner.

NegativeInt

Represents an int < 0

NonEmptyArray<'a>

Represents a non-empty array.

NonEmptySet<'a>

Represents a non-empty Set.

NonEmptyString

Represents a string that is not null or empty, and does not contain any null characters ('\000')

NonNegativeInt

Represents an int >= 0

NonNull<'a>

Wrap a type in NonNull to prevent null being generated for the wrapped type.

NonWhiteSpaceString

Represents a string that is not null, empty or consists only of white-space characters and does not contain any null characters ('\000')

NonZeroInt

Represents an int <> 0

NormalFloat

Represents a float that is not NaN or Infinity.

Outcome

PositiveInt

Represents an int > 0

Prop

Combinators to build properties, which define the property to be tested, with some convenience methods to investigate the generated arguments and any found counter-examples.

Property

A Property can be checked by FsCheck.

PropertyExtensions

Extensons to construct Properties.

PropOperators

Operators for Prop.

Random

Generate random numbers based on splitting seeds. Based Hugs' Random implementation.

Result

The result of one execution of a property.

Rose<'a>

Runner

StringNoNulls

Represents a string that does not contain null characters ('\000')

TestData

TestResult

ThrowingFunction<'a, 'b>

TypeClass

Haskell typeclass concept simulation. For internal use.

UnicodeChar

Represents a unicode char.

UnicodeString

Represents a string that can contain unicode characters.

WeightAndValue<'a>

2-tuple containing a weight and a value, used in some Gen methods to indicate the probability of a value.

XmlEncodedString

Represents a string that can be serializable as a XML value.