FsCheck


Default

Namespace: FsCheck
Parent Module: Arb

Static members

Static memberDescription
Array()
Signature: unit -> Arbitrary<'a []>
Type parameters: 'a

Generate a rank 1 array.

Array2D()
Signature: unit -> Arbitrary<'?74170 [,]>
Type parameters: '?74170

Generate a rank 2, zero based array.

Arrow()
Signature: unit -> Arbitrary<('a -> 'b)>
Type parameters: 'a, 'b

Generate a function value. Function values can be generated for types 'a->'b where 'b has an Arbitrary instance. There is no shrinking for function values.

BigInt()
Signature: unit -> Arbitrary<BigInteger>

Arbitray instance for BigInteger.

Bool()
Signature: unit -> Arbitrary<bool>

Generates an arbitrary bool.

Byte()
Signature: unit -> Arbitrary<byte>

Generates an arbitrary byte.

Char()
Signature: unit -> Arbitrary<char>

Generates arbitrary chars, between ASCII codes Char.MinValue and 127.

Culture()
Signature: unit -> Arbitrary<CultureInfo>
DateTime()
Signature: unit -> Arbitrary<DateTime>

Generates an arbitrary DateTime between 1900 and 2100. A DateTime is shrunk by removing its second, minute and hour components.

DateTimeOffset()
Signature: unit -> Arbitrary<DateTimeOffset>

Generates an arbitrary DateTimeOffset between 1900 and 2100. A DateTimeOffset is shrunk first by shrinking its offset, then by removing its second, minute and hour components.

Decimal()
Signature: unit -> Arbitrary<Decimal>

Generate arbitrary decimal.

Derive()
Signature: unit -> Arbitrary<'a>
Type parameters: 'a

Try to derive an arbitrary instance for the given type reflectively. Generates and shrinks values for record, union, tuple and enum types. Also generates (but doesn't shrink) values for basic classes (i.e. either classes having a single constructor with immutable values
or DTO classes with a default constructor and public property setters).

Dictionary()
Signature: unit -> Arbitrary<Dictionary<'?74242,'?74243>>
Type parameters: '?74242, '?74243

Generate a System.Collections.Generic.Dictionary of values. Shrinks by reducing the number of elements

DoNotShrink()
Signature: unit -> Arbitrary<DoNotShrink<'?74258>>
Type parameters: '?74258

Overrides the shrinker of any type to be empty, i.e. not to shrink at all.

DoNotSizeInt16()
Signature: unit -> Arbitrary<DoNotSize<int16>>

Generate arbitrary int16 that is uniformly distributed in the whole range of int16 values.

DoNotSizeInt32()
Signature: unit -> Arbitrary<DoNotSize<int>>

Generate arbitrary int32 that is unrestricted by size.

DoNotSizeInt64()
Signature: unit -> Arbitrary<DoNotSize<int64>>

Generate arbitrary int64 that is unrestricted by size.

DoNotSizeUInt16()
Signature: unit -> Arbitrary<DoNotSize<uint16>>

Generate arbitrary uint16 that is uniformly distributed in the whole range of uint16 values.

DoNotSizeUInt32()
Signature: unit -> Arbitrary<DoNotSize<uint32>>

Generate arbitrary uint32 that is unrestricted by size.

DoNotSizeUInt64()
Signature: unit -> Arbitrary<DoNotSize<uint64>>

Generate arbitrary uint64 that is unrestricted by size.

DontShrink()
Signature: unit -> Arbitrary<DoNotShrink<'?74256>>
Type parameters: '?74256

Overrides the shrinker of any type to be empty, i.e. not to shrink at all.

DontSizeInt16()
Signature: unit -> Arbitrary<DoNotSize<int16>>

Generate arbitrary int16 that is uniformly distributed in the whole range of int16 values.

DontSizeInt32()
Signature: unit -> Arbitrary<DoNotSize<int>>

Generate arbitrary int32 that is unrestricted by size.

DontSizeInt64()
Signature: unit -> Arbitrary<DoNotSize<int64>>

Generate arbitrary int64 that is unrestricted by size.

DontSizeUInt16()
Signature: unit -> Arbitrary<DoNotSize<uint16>>

Generate arbitrary uint16 that is uniformly distributed in the whole range of uint16 values.

DontSizeUInt32()
Signature: unit -> Arbitrary<DoNotSize<uint32>>

Generate arbitrary uint32 that is unrestricted by size.

DontSizeUInt64()
Signature: unit -> Arbitrary<DoNotSize<uint64>>

Generate arbitrary uint64 that is unrestricted by size.

FixedLengthArray()
Signature: unit -> Arbitrary<FixedLengthArray<'a>>
Type parameters: 'a

Arrays whose length does not change when shrinking.

Float()
Signature: unit -> Arbitrary<double>

Generates arbitrary 64 bit floats, NaN, NegativeInfinity, PositiveInfinity, Maxvalue, MinValue, Epsilon included fairly frequently.

Float32()
Signature: unit -> Arbitrary<float32>

Generates arbitrary 32 bit floats, NaN, NegativeInfinity, PositiveInfinity, Maxvalue, MinValue, Epsilon included fairly frequently.

FsList()
Signature: unit -> Arbitrary<'a list>
Type parameters: 'a

Generate a list of values. The size of the list is between 0 and the test size + 1.

Fun()
Signature: unit -> Arbitrary<('?74175 -> '?74176)>
Type parameters: '?74175, '?74176

Generate a F# function value. Function values can be generated for types 'a->'b where 'b has an Arbitrary instance. There is no shrinking for function values.

CompiledName: FSharpFun

Function()
Signature: unit -> Arbitrary<Function<'a,'b>>
Type parameters: 'a, 'b

Generate a Function value that can be printed and shrunk. Function values can be generated for types 'a->'b where 'b has an Arbitrary instance.

Guid()
Signature: unit -> Arbitrary<Guid>
HostName()
Signature: unit -> Arbitrary<HostName>
ICollection()
Signature: unit -> Arbitrary<ICollection<'?74240>>
Type parameters: '?74240

Generate a System.Collections.Generic.ICollection of values.

IDictionary()
Signature: unit -> Arbitrary<IDictionary<'?74245,'?74246>>
Type parameters: '?74245, '?74246

Generate a System.Collections.Generic.IDictionary of values. Shrinks by reducing the number of elements

IList()
Signature: unit -> Arbitrary<IList<'?74238>>
Type parameters: '?74238

Generate a System.Collections.Generic.IList of values.

Int16()
Signature: unit -> Arbitrary<int16>

Generate arbitrary int16 that is between -size and size.

Int32()
Signature: unit -> Arbitrary<int>

Generate arbitrary int32 that is between -size and size.

Int64()
Signature: unit -> Arbitrary<int64>

Generate arbitrary int64 that is between -size and size. Note that since the size is an int32, this does not actually cover the full range of int64. See DoNotSize instead.

Interval()
Signature: unit -> Arbitrary<Interval>

Generates an interval between two non-negative integers.

IntWithMinMax()
Signature: unit -> Arbitrary<IntWithMinMax>
IPAddress()
Signature: unit -> Arbitrary<IPAddress>
IPv4Address()
Signature: unit -> Arbitrary<IPv4Address>
IPv6Address()
Signature: unit -> Arbitrary<IPv6Address>
KeyValuePair()
Signature: unit -> Arbitrary<KeyValuePair<'?74214,'?74215>>
Type parameters: '?74214, '?74215
List()
Signature: unit -> Arbitrary<List<'?74236>>
Type parameters: '?74236

Generate a System.Collections.Generic.List of values.

MailAddress()
Signature: unit -> Arbitrary<MailAddress>
Map()
Signature: unit -> Arbitrary<Map<'?74227,'?74228>>
Type parameters: '?74227, '?74228
NegativeInt()
Signature: unit -> Arbitrary<NegativeInt>
NonEmptyArray()
Signature: unit -> Arbitrary<NonEmptyArray<'?74230>>
Type parameters: '?74230
NonEmptySet()
Signature: unit -> Arbitrary<NonEmptySet<'?74232>>
Type parameters: '?74232
NonEmptyString()
Signature: unit -> Arbitrary<NonEmptyString>
NonNegativeInt()
Signature: unit -> Arbitrary<NonNegativeInt>
NonNull()
Signature: unit -> Arbitrary<NonNull<'a>>
Type parameters: 'a

Generate underlying values that are not null.

NonZeroInt()
Signature: unit -> Arbitrary<NonZeroInt>
NormalFloat()
Signature: unit -> Arbitrary<NormalFloat>

Generates a "normal" 64 bit floats (without NaN, Infinity, Epsilon, MinValue, MaxValue)

Nullable()
Signature: unit -> Arbitrary<Nullable<'a>>
Type parameters: 'a

Generate a nullable value that is null 1/8 of the time.

Object()
Signature: unit -> Arbitrary<obj>

Generate an object - a boxed char, string or boolean value.

Option()
Signature: unit -> Arbitrary<'a option>
Type parameters: 'a

Generate an option value that is 'None' 1/8 of the time.

PositiveInt()
Signature: unit -> Arbitrary<PositiveInt>
SByte()
Signature: unit -> Arbitrary<sbyte>

Generates an arbitrary signed byte.

Set()
Signature: unit -> Arbitrary<Set<'?74225>>
Type parameters: '?74225
String()
Signature: unit -> Arbitrary<String>

Generates arbitrary strings, which are lists of chars generated by Char.

StringWithoutNullChars()
Signature: unit -> Arbitrary<StringNoNulls>
SystemAction()
Signature: unit -> Arbitrary<Action>

Generates an Action'0

SystemAction1()
Signature: unit -> Arbitrary<Action<'?74202>>
Type parameters: '?74202

Generates an Action'1

SystemAction2()
Signature: unit -> Arbitrary<Action<'?74204,'?74205>>
Type parameters: '?74204, '?74205

Generates an Action'2

SystemAction3()
Signature: unit -> Arbitrary<Action<'?74207,'?74208,'?74209>>
Type parameters: '?74207, '?74208, '?74209

Generates an Action'3

SystemFunc()
Signature: unit -> Arbitrary<Func<'?74187>>
Type parameters: '?74187

Generates a Func'1.

SystemFunc1()
Signature: unit -> Arbitrary<Func<'?74189,'?74190>>
Type parameters: '?74189, '?74190

Generates a Func'2.

SystemFunc2()
Signature: unit -> Arbitrary<Func<'?74192,'?74193,'?74194>>
Type parameters: '?74192, '?74193, '?74194

Generates a Func'3.

SystemFunc3()
Signature: unit -> Arbitrary<Func<'?74196,'?74197,'?74198,'?74199>>
Type parameters: '?74196, '?74197, '?74198, '?74199

Generates a Func'4.

ThrowingFunction()
Signature: unit -> Arbitrary<ThrowingFunction<'?74181,'?74182>>
Type parameters: '?74181, '?74182

Generate an F# function value that generates an instance of the function result type about half the time. The other times it generates one of a list of common .NET exceptions, including Exception, ArgumentException, ArithmeticException, IOException, NotImplementedException, OUtOfMemoryException and others.

CompiledName: ThrowingFSharpFun

ThrowingFunction(exceptions)
Signature: exceptions:seq<Exception> -> Arbitrary<ThrowingFunction<'a,'b>>
Type parameters: 'a, 'b

Generate am F# function value that generates an instance of the function result type about half the time. The other times it generates one of the given exceptions.

CompiledName: ThrowingFSharpFun

TimeSpan()
Signature: unit -> Arbitrary<TimeSpan>

Generates an arbitrary TimeSpan. A TimeSpan is shrunk by removing days, hours, minutes, second and milliseconds.

UInt16()
Signature: unit -> Arbitrary<uint16>

Generate arbitrary uint16 that is between 0 and size.

UInt32()
Signature: unit -> Arbitrary<uint32>

Generate arbitrary uint32 that is between 0 and size.

UInt64()
Signature: unit -> Arbitrary<uint64>

Generate arbitrary uint64 that is between 0 and size.

Unit()
Signature: unit -> Arbitrary<unit>

Generates (), of the unit type.

Fork me on GitHub