Falsifiable, after 1 test (3 shrinks) (12860091623354605327,1242882491839509389)
-Last step was invoked with size of 2 and seed of (6770465432084718975,11292055197076861381):
+Falsifiable, after 1 test (1 shrink) (11593563362127034489,14430334213194706819)
+Last step was invoked with size of 2 and seed of (15719109238360588732,2224875665865033133):
Label of failing property: result not sum
Original:
--1
1
+0
Shrunk:
0
0
diff --git a/QuickStart.html b/QuickStart.html
index 14fc421a..771dd07e 100644
--- a/QuickStart.html
+++ b/QuickStart.html
@@ -113,11 +113,9 @@ Falsifiable, after 1 test (1 shrink) (1044306273230240130,12856555433618444501)
-Last step was invoked with size of 2 and seed of (11529939979664627634,3928163698192096459):
+Falsifiable, after 1 test (0 shrinks) (4393646069879480,18079488167729558079)
+Last step was invoked with size of 2 and seed of (7357945107814917971,14014315941052924635):
Original:
-[-1; 0]
-Shrunk:
[1; 0]
with exception:
System.Exception: Expected true, got false.
|
@@ -144,10 +142,10 @@
-Falsifiable, after 17 tests (6 shrinks) (12003914617536896781,4245046932773807927)
-Last step was invoked with size of 18 and seed of (801088087772054284,8353231879387336807):
+Falsifiable, after 5 tests (2 shrinks) (6052624745530665396,8848057741778897767)
+Last step was invoked with size of 6 and seed of (7793851348548928310,17417373581710584239):
Original:
-[0.0; -0.8516859466; nan; 0.0; -infinity; nan; -0.0]
+[-0.6356436296; -0.1077786633; nan]
Shrunk:
[nan]
with exception:
diff --git a/RunningTests.html b/RunningTests.html
index 07437488..f96913a5 100644
--- a/RunningTests.html
+++ b/RunningTests.html
@@ -145,10 +145,10 @@ --- Checking ListProperties ---
ListProperties.reverse of reverse is original-Ok, passed 100 tests.
-ListProperties.reverse is original-Falsifiable, after 2 tests (2 shrinks) (10232327670056031672,15190129820286491799)
-Last step was invoked with size of 3 and seed of (8231381327023492931,13197688870822028301):
+ListProperties.reverse is original-Falsifiable, after 2 tests (2 shrinks) (4542366446428011722,10392892719097926689)
+Last step was invoked with size of 3 and seed of (12267543692749780264,16289912280878454005):
Original:
-[0; 0; -1]
+[2; -1]
Shrunk:
[0; 1]
with exception:
diff --git a/StatefulTestingNew.html b/StatefulTestingNew.html
index 94a07cf0..2c6835dd 100644
--- a/StatefulTestingNew.html
+++ b/StatefulTestingNew.html
@@ -156,25 +156,22 @@
-Falsifiable, after 10 tests (9 shrinks) (14109763696607613050,486088154503131329)
-Last step was invoked with size of 11 and seed of (1756509616903215099,12028728125209013407):
+Falsifiable, after 6 tests (4 shrinks) (12770152580777276754,10005441753482479477)
+Last step was invoked with size of 7 and seed of (17861426896115535097,11667813865249411481):
Label of failing property: Inc: model = 5, actual = 6
Original:
-(3, Setup Counter)
-inc -> 4
-dec -> 3
-inc -> 4
-dec -> 3
+(2, Setup Counter)
+dec -> 1
+inc -> 2
+inc -> 3
inc -> 4
inc -> 5
dec -> 4
dec -> 3
-dec -> 2
-inc -> 3
-dec -> 2
Shrunk:
-(3, Setup Counter)
+(2, Setup Counter)
+inc -> 3
inc -> 4
inc -> 5
diff --git a/TestData.html b/TestData.html
index 5b57514a..427661d1 100644
--- a/TestData.html
+++ b/TestData.html
@@ -271,7 +271,7 @@
but any value would do; it wouldn't change the result.
While Gen.choose (0, 9) generates a single integer value, Gen.sample 0 10
generates 10 sample values:
-[|6; 6; 6; 4; 8; 8; 3; 8; 1; 5|]
|
+[|2; 0; 7; 4; 3; 7; 4; 5; 5; 0|]
|
If you supply values in the 'wrong order', Gen.choose will follow
Postel's law and 'know
what you meant':
@@ -280,7 +280,7 @@
In this example, the first value is greater than the second value, but
Gen.choose will happily interpret this as a range, and produce values between
42 and 99, both included:
-[|42; 90; 97; 86; 64; 96; 45; 48; 84; 95|]
|
+[|66; 80; 49; 73; 85; 85; 50; 65; 49; 63|]
|
Since both values are included, if you set both to the same value, you'll
effectively constrain the generator to that single value, and it'll behave like
Gen.constant .
@@ -298,7 +298,7 @@
The result of this expression is a list of ten sample values. Each value is
a single integer drawn from the collection of numbers:
-[|42; -273; 1453; -273; 7; 7; -273; 1453; 42; -100|]
|
+[|42; 7; -273; 42; 1337; 7; 1453; 1453; -100; -273|]
|
All elements are equally likely to be drawn from the collection; we say that
the random function has a uniform distribution. One easy way to affect the
distribution is to put more than one identical element into the collection:
@@ -306,7 +306,7 @@
In the above example, the value "foo" appears twice, so is twice as likely
to be drawn from the collection:
-[|"foo"; "foo"; "bar"; "foo"; "foo"; "foo"; "foo"; "foo"; "bar"; "foo"|]
|
+[|"bar"; "foo"; "bar"; "bar"; "foo"; "bar"; "bar"; "foo"; "bar"; "foo"|]
|
The above examples all use list values as input, but you can use any seq
expression, including list and array values, as long as the sequence is
finite.
@@ -324,13 +324,13 @@ [|'b'; 'b'; 'a'; 'b'; 'c'; 'a'; 'a'; 'a'; 'a'; 'a'|]
|
+[|'a'; 'c'; 'b'; 'b'; 'c'; 'b'; 'c'; 'a'; 'a'; 'c'|]
|
Let's run Gen.growingElements again, with the same input but with size 7 :
Gen.growingElements ['a'; 'b'; 'c'; 'd'; 'e'; 'f'; 'g'; 'h'; 'i'; 'j'] |> Gen.sampleWithSize 7 10
The result of this expression is a list of ten sample values. Each value is
now a single character drawn from the segment ['a'; 'b'; 'c'; 'd'; 'e'; 'f'; 'g'] :
-[|'f'; 'f'; 'b'; 'a'; 'f'; 'e'; 'b'; 'g'; 'g'; 'a'|]
|
+[|'b'; 'c'; 'f'; 'd'; 'b'; 'a'; 'e'; 'e'; 'g'; 'a'|]
|
The above examples all use list values as input, but you can use any seq
expression, including list and array values, as long as the sequence is
finite.
@@ -344,7 +344,7 @@
This example uses the byte function to cast any int created by
Gen.choose (0, 127) to a byte value:
-[|61uy; 116uy; 104uy; 5uy; 70uy; 57uy; 31uy; 40uy; 64uy; 75uy|]
|
+[|84uy; 114uy; 44uy; 6uy; 2uy; 95uy; 30uy; 56uy; 75uy; 112uy|]
|
This is only a basic example of the concept of Gen.map . In this particular
example, you could also have used Gen.elements [0uy..127uy] to achieve the
same result without using Gen.map , so let's consider a second
@@ -358,9 +358,9 @@
In this example, the generated DateTime value is immediately formatted as
a string , so that the output is more readable:
-[|"2019-11-08 00:00:00Z"; "2019-11-06 00:00:00Z"; "2019-11-26 00:00:00Z";
- "2019-11-15 00:00:00Z"; "2019-11-08 00:00:00Z"; "2019-11-12 00:00:00Z";
- "2019-11-06 00:00:00Z"; "2019-11-11 00:00:00Z"; "2019-11-19 00:00:00Z";
+[|"2019-11-24 00:00:00Z"; "2019-11-23 00:00:00Z"; "2019-11-12 00:00:00Z";
+ "2019-11-23 00:00:00Z"; "2019-11-23 00:00:00Z"; "2019-11-20 00:00:00Z";
+ "2019-11-09 00:00:00Z"; "2019-11-09 00:00:00Z"; "2019-11-06 00:00:00Z";
"2019-11-29 00:00:00Z"|]
|
This causes the resulting generator to have the type Gen<string> , but if
you omit calling ToString "u" , its type would have been Gen<DateTime> .
@@ -375,7 +375,7 @@
This combination uses Gen.constant 42 as an individual generator, and then
generates lists containing the the number 42. While the value(s) in the list is
always 42, the length of the generated lists varies.
-[|[42]; []; [42]; []; [42]; [42]; [42]; [42]; [42]; []|]
|
+[|[42]; [42]; [42]; [42]; [42]; []; [42]; []; []; [42]|]
|
The length of the generated list is determined by the size argument. In
this example, the size argument is 1 , so the generated lists are short.
Note that while there's a correlation beteen size and the length of the
@@ -386,10 +386,10 @@
This example uses Gen.choose (24, 42) in order to generate individual
integer values between 24 and 42. It then pipes this generator into
Gen.listOfLength 5 in order to generate lists with exactly five elements:
-[|[33; 40; 42; 33; 33]; [40; 26; 27; 40; 27]; [41; 26; 31; 35; 28];
- [24; 27; 31; 37; 31]; [38; 42; 28; 25; 32]; [35; 41; 33; 33; 36];
- [24; 27; 37; 40; 24]; [40; 29; 33; 25; 36]; [26; 26; 36; 26; 34];
- [29; 39; 36; 36; 34]|]
|
+[|[41; 41; 33; 29; 42]; [40; 39; 32; 36; 25]; [33; 41; 26; 35; 30];
+ [38; 34; 26; 31; 28]; [37; 28; 25; 28; 42]; [36; 31; 35; 34; 28];
+ [32; 37; 36; 24; 38]; [31; 32; 34; 26; 40]; [40; 30; 32; 31; 29];
+ [24; 39; 29; 40; 38]|]
|
Notice that all sample lists have exactly five elements.
You can also use Gen.nonEmptyListOf to create lists that are guaranteed to
have at least one element. Like the other list generators, it uses a
@@ -399,12 +399,11 @@
Like Gen.listOf , Gen.nonEmptyListOf uses size to control the length
of the generated lists. They may still be small, but the larger the size
argument, the larger the lists may become.
-[|["foo"; "baz"; "bar"; "bar"; "bar"; "bar"; "foo"; "bar"; "bar"; "baz"; "baz";
- "foo"; "bar"; "bar"; "foo"; "baz"; "foo"; "bar"];
- ["bar"; "baz"; "foo"; "foo"; "baz"; "baz"; "bar"; "baz"; "bar"; "foo"; "foo";
- "foo"]; ["foo"; "bar"; "foo"; "bar"; "foo"; "foo"; "foo"; "baz"];
- ["foo"; "foo"; "foo"; "bar"; "bar"; "baz"; "foo"; "foo"; "bar"; "baz"; "baz";
- "foo"; "foo"]|]
|
+[|["bar"; "foo"; "bar"; "bar"; "bar"; "bar"; "foo"; "bar"; "foo"; "baz"; "foo";
+ "bar"; "bar"];
+ ["bar"; "baz"; "bar"; "foo"; "foo"; "bar"; "foo"; "baz"; "foo"; "bar"; "foo";
+ "bar"; "foo"; "foo"; "foo"]; ["baz"; "foo"; "baz"; "bar"; "baz"; "baz"];
+ ["bar"]|]
|
In this example, each element is drawn from the small set "foo", "bar", and
"baz". The lists are guaranteed to have at least a single element, but may be
longer.
@@ -420,9 +419,9 @@
example, but any value would do; it wouldn't change the result.
The result of this expression is a list of lists, where each list contains
the original input list, but shuffled:
-[|[|"qux"; "bar"; "foo"; "baz"|]; [|"baz"; "foo"; "qux"; "bar"|];
- [|"foo"; "qux"; "bar"; "baz"|]; [|"foo"; "baz"; "bar"; "qux"|];
- [|"baz"; "qux"; "bar"; "foo"|]; [|"baz"; "foo"; "qux"; "bar"|]|]
|
+[|[|"qux"; "bar"; "foo"; "baz"|]; [|"foo"; "baz"; "qux"; "bar"|];
+ [|"foo"; "qux"; "bar"; "baz"|]; [|"baz"; "qux"; "foo"; "bar"|];
+ [|"foo"; "baz"; "bar"; "qux"|]; [|"baz"; "bar"; "foo"; "qux"|]|]
|
The above example uses a list value as input, but you can use any seq
expression, including list and array values, as long as the sequence is
finite.
@@ -443,8 +442,8 @@
Gen.two uses a single-value generator to create a generator of two-element
tuples. This example generates 10 sample points, where each coordinate is
between -100 and 100:
-[|(-43, -18); (-51, 34); (13, -98); (-22, 36); (-48, 0); (-73, -45); (-7, -70);
- (80, 74); (75, 10); (23, 6)|]
|
+[|(93, 47); (-40, -80); (-15, 44); (-73, -29); (-93, 53); (1, 79); (-22, 96);
+ (-99, -53); (-94, -46); (1, 39)|]
|
If you want to model a coordinate system in three-dimensional space, you may
decide to use floating points instead:
Gen.elements [-10.0..0.01..10.0] |> Gen.three |> Gen.sampleWithSize 0 10
@@ -453,10 +452,10 @@
from between -10 and 10, with two decimals; that defines a Gen<float> .
Second, Gen.three takes that Gen<float> and turns it into a
Gen<float * float * float> :
-[|(7.13, 1.22, 1.08); (-6.39, 9.72, 5.35); (-1.04, -5.63, -4.46);
- (-6.12, 2.52, 0.64); (0.19, 5.52, -4.06); (-7.23, 2.15, 3.3);
- (7.69, 0.66, -5.47); (3.21, 1.39, 3.84); (6.08, 3.57, -6.54);
- (-4.79, 8.32, -8.68)|]
|
+[|(-8.6, -2.9, -0.62); (-3.66, 7.32, -9.37); (4.2, -6.22, 2.31);
+ (6.72, -7.58, -7.01); (-5.65, 1.97, -8.54); (-8.65, 1.5, 8.09);
+ (-7.01, -1.36, 5.1); (1.36, 6.01, 6.37); (-0.45, 5.19, 9.99);
+ (-0.12, 3.11, -0.95)|]
|
Finally, Gen.four transforms a single-value generator into a generator of
four-element tuples. As all the other combinators in the Gen module, you
can combine it with other functions to define more specific values. Imagine,
@@ -478,8 +477,8 @@
overload of Version that takes four integers; in F# 4, constructors can be
treated as functions, and a constructor with four arguments can be treated as a
function that takes a four-element tuple.
-[|"4.0.4.9"; "9.2.5.7"; "5.0.1.3"; "3.6.8.6"; "1.5.3.5"; "3.7.7.2"; "7.9.5.3";
- "3.1.8.1"; "0.0.1.3"; "1.1.5.2"|]
|
+[|"9.3.9.8"; "7.6.3.9"; "7.9.4.0"; "8.0.6.8"; "1.7.0.2"; "4.3.4.8"; "7.8.1.7";
+ "0.0.5.3"; "2.3.8.8"; "3.3.3.8"|]
|
This example composes the Version constructor with the string function,
in order to produce a more readable output. The resulting generator has the
type Gen<string> , but if you remove the string composition, the type would
@@ -502,8 +501,8 @@
This expression generates 10 sample lists, each containing two different
numbers:
-[|[82; 27]; [32; 21]; [42; 87]; [66; 71]; [50; 3]; [41; 97]; [69; 52]; [77; 64];
- [83; 72]; [72; 4]|]
|
+[|[88; 20]; [77; 47]; [60; 81]; [35; 89]; [68; 45]; [79; 90]; [89; 30]; [22; 2];
+ [32; 60]; [54; 74]|]
|
When using Gen.filter , be sure to provide a predicate with a high chance
of returning true . If the predicate discards 'too many' candidates, it may
cause tests to run slower, or to not terminate at all. If your filter is
diff --git a/TipsAndTricks.html b/TipsAndTricks.html
index 381a108e..5d64fde9 100644
--- a/TipsAndTricks.html
+++ b/TipsAndTricks.html
@@ -104,13 +104,13 @@
-Falsifiable, after 2 tests (5 shrinks) (3552841221687708192,12217304798067418545)
-Last step was invoked with size of 3 and seed of (10682276408326868144,12091696057702856153):
+Falsifiable, after 1 test (4 shrinks) (2709063280233054354,1999424520759833675)
+Last step was invoked with size of 2 and seed of (12257973958947804762,2230250005562319721):
Original:
-{ -3->0; 0->3; 3->-2 }
-[0; -3]
+{ -1->1; 0->-2; 1->1 }
+[-1; 1]
Shrunk:
-{ -3->0; 0->1; 3->-2 }
+{ -1->0; 0->-2; 1->0 }
[0]
with exception:
System.Exception: Expected true, got false.
|
@@ -150,12 +150,12 @@
-Falsifiable, after 1 test (2 shrinks) (15335884441874016146,13258091168748484167)
-Last step was invoked with size of 2 and seed of (12568667976155014281,15600108725233094851):
+Falsifiable, after 1 test (2 shrinks) (16721128096877836706,7885872659260408077)
+Last step was invoked with size of 2 and seed of (16196528691035398400,17678704255348351607):
Label of failing property: 1 = -1
Original:
-2
-1
+2
Shrunk:
0
0
diff --git a/index.json b/index.json
index b2e6ddea..a26d507f 100644
--- a/index.json
+++ b/index.json
@@ -1 +1 @@
-[{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck.html","title":"FsCheck","content":"Runner \nArbitrary\u003C\u0027T\u003E \nCheck \nCheckExtensions \nConfig \nConfigExtensions \nDoNotShrink\u003C\u0027a\u003E \nDoNotSize\u003C\u0027a\u003E \nFixedLengthArray\u003C\u0027T\u003E \nFunction\u003C\u0027a, \u0027b\u003E \nGen\u003C\u0027T\u003E \nHostName \nIArbMap \nIPv4Address \nIPv6Address \nIRunner \nIntWithMinMax \nInterval \nNegativeInt \nNonEmptyArray\u003C\u0027T\u003E \nNonEmptySet\u003C\u0027T\u003E \nNonEmptyString \nNonNegativeInt \nNonNull\u003C\u0027a\u003E \nNonWhiteSpaceString \nNonZeroInt \nNormalFloat \nOutcome \nParallelRunConfig \nPositiveInt \nProperty \nReplay \nResult \nResultContainer \nRnd \nStringNoNullChar \nTestData \nTestResult \nThrowingFunction\u003C\u0027a, \u0027b\u003E \nUnicodeChar \nUnicodeString \nXmlEncodedString"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental.html","title":"FsCheck.Experimental","content":"StateMachine \nDisposeCall\u003C\u0027Actual\u003E \nIOperation \nIOperationResult \nMachine\u003C\u0027Actual, \u0027Model\u003E \nMachineRun\u003C\u0027Actual, \u0027Model\u003E \nMethodCall\u003C\u0027Actual\u003E \nNew\u003C\u0027Actual\u003E \nObjectMachine\u003C\u0027Actual\u003E \nObjectMachineModel \nOperation\u003C\u0027Actual, \u0027Model\u003E \nOperationResult\u003C\u0027a\u003E \nSetup\u003C\u0027Actual, \u0027Model\u003E \nStateMachineExtensions \nStopOperation\u003C\u0027Actual, \u0027Model\u003E \nTearDown\u003C\u0027Actual\u003E"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp.html","title":"FsCheck.FSharp","content":"Arb \nArbMap \nArbPatterns \nGen \nGenBuilder \nGenOperators \nProp \nPropOperators"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent.html","title":"FsCheck.Fluent","content":"Arb \nArbMap \nGen \nProp"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals.html","title":"FsCheck.Internals","content":"Numeric \nShrink\u003C\u0027T\u003E"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-runner.html","title":"Runner","content":"Runner \n \nRunner.stepsSeq \nstepsSeq \nRunner.argumentsToString \nargumentsToString \nRunner.onStartFixtureToString \nonStartFixtureToString \nRunner.onFailureToString \nonFailureToString \nRunner.onFinishedToString \nonFinishedToString \nRunner.onArgumentsToString \nonArgumentsToString \nRunner.onShrinkToString \nonShrinkToString \nRunner.consoleRunner \nconsoleRunner"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-runner.html#stepsSeq","title":"Runner.stepsSeq","content":"Runner.stepsSeq \nstepsSeq \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-runner.html#argumentsToString","title":"Runner.argumentsToString","content":"Runner.argumentsToString \nargumentsToString \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-runner.html#onStartFixtureToString","title":"Runner.onStartFixtureToString","content":"Runner.onStartFixtureToString \nonStartFixtureToString \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-runner.html#onFailureToString","title":"Runner.onFailureToString","content":"Runner.onFailureToString \nonFailureToString \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-runner.html#onFinishedToString","title":"Runner.onFinishedToString","content":"Runner.onFinishedToString \nonFinishedToString \n\nA function that returns the default string that is printed as a result of the test.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-runner.html#onArgumentsToString","title":"Runner.onArgumentsToString","content":"Runner.onArgumentsToString \nonArgumentsToString \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-runner.html#onShrinkToString","title":"Runner.onShrinkToString","content":"Runner.onShrinkToString \nonShrinkToString \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-runner.html#consoleRunner","title":"Runner.consoleRunner","content":"Runner.consoleRunner \nconsoleRunner \n\nA runner that prints results to the standard output.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-arbitrary-1.html","title":"Arbitrary\u003C\u0027T\u003E","content":"Arbitrary\u003C\u0027T\u003E \n \nArbitrary\u003C\u0027T\u003E.( .ctor ) \n( .ctor ) \nArbitrary\u003C\u0027T\u003E.Shrinker \nShrinker \nArbitrary\u003C\u0027T\u003E.Generator \nGenerator"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-arbitrary-1.html#( .ctor )","title":"Arbitrary\u003C\u0027T\u003E.( .ctor )","content":"Arbitrary\u003C\u0027T\u003E.( .ctor ) \n( .ctor ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-arbitrary-1.html#Shrinker","title":"Arbitrary\u003C\u0027T\u003E.Shrinker","content":"Arbitrary\u003C\u0027T\u003E.Shrinker \nShrinker \n\nReturns a sequence of the immediate shrinks of the given value. The immediate shrinks should not include\ndoubles or the given value itself. The default implementation returns the empty sequence (i.e. no shrinking).\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-arbitrary-1.html#Generator","title":"Arbitrary\u003C\u0027T\u003E.Generator","content":"Arbitrary\u003C\u0027T\u003E.Generator \nGenerator \n\nReturns a generator for \u0027a.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html","title":"Check","content":"Check \n \nCheck.All \nAll \nCheck.All \nAll \nCheck.Method \nMethod \nCheck.One \nOne \nCheck.One \nOne \nCheck.Quick \nQuick \nCheck.Quick \nQuick \nCheck.QuickAll \nQuickAll \nCheck.QuickAll \nQuickAll \nCheck.QuickThrowOnFailure \nQuickThrowOnFailure \nCheck.QuickThrowOnFailureAll \nQuickThrowOnFailureAll \nCheck.QuickThrowOnFailureAll \nQuickThrowOnFailureAll \nCheck.Verbose \nVerbose \nCheck.Verbose \nVerbose \nCheck.VerboseAll \nVerboseAll \nCheck.VerboseAll \nVerboseAll \nCheck.VerboseThrowOnFailure \nVerboseThrowOnFailure \nCheck.VerboseThrowOnFailureAll \nVerboseThrowOnFailureAll \nCheck.VerboseThrowOnFailureAll \nVerboseThrowOnFailureAll"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#All","title":"Check.All","content":"Check.All \nAll \n\nCheck all public static methods on the given type that have a testable return type with the given configuration.\nThis includes let-bound functions in a module.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#All","title":"Check.All","content":"Check.All \nAll \n\nCheck all public static methods on the given type that have a testable return type with the given configuration.\nThis includes let-bound functions in a module.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#Method","title":"Check.Method","content":"Check.Method \nMethod \n\nCheck the given property identified by the given MethodInfo.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#One","title":"Check.One","content":"Check.One \nOne \n\nCheck the given property using the given config, and the given test name.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#One","title":"Check.One","content":"Check.One \nOne \n\nCheck the given property using the given config.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#Quick","title":"Check.Quick","content":"Check.Quick \nQuick \n\nCheck one property with the quick configuration, and using the given name.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#Quick","title":"Check.Quick","content":"Check.Quick \nQuick \n\nCheck one property with the quick configuration.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#QuickAll","title":"Check.QuickAll","content":"Check.QuickAll \nQuickAll \n\nCheck all public static methods on the given type that have a testable return type with quick configuration\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#QuickAll","title":"Check.QuickAll","content":"Check.QuickAll \nQuickAll \n\nCheck all public static methods on the given type that have a testable return type with quick configuration\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#QuickThrowOnFailure","title":"Check.QuickThrowOnFailure","content":"Check.QuickThrowOnFailure \nQuickThrowOnFailure \n\nCheck one property with the quick configuration, and throw an exception if it fails or is exhausted.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#QuickThrowOnFailureAll","title":"Check.QuickThrowOnFailureAll","content":"Check.QuickThrowOnFailureAll \nQuickThrowOnFailureAll \n\nCheck all public static methods on the given type that have a testable return type with quick configuration\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#QuickThrowOnFailureAll","title":"Check.QuickThrowOnFailureAll","content":"Check.QuickThrowOnFailureAll \nQuickThrowOnFailureAll \n\nCheck all public static methods on the given type that have a testable return type with quick configuration, \nand throw on failure or exhaustion.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#Verbose","title":"Check.Verbose","content":"Check.Verbose \nVerbose \n\nCheck one property with the verbose configuration, and using the given name.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#Verbose","title":"Check.Verbose","content":"Check.Verbose \nVerbose \n\nCheck one property with the verbose configuration.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#VerboseAll","title":"Check.VerboseAll","content":"Check.VerboseAll \nVerboseAll \n\n Check all public static methods on the given type that have a testable return type with the verbose configuration\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#VerboseAll","title":"Check.VerboseAll","content":"Check.VerboseAll \nVerboseAll \n\n Check all public static methods on the given type that have a testable return type with the verbose configuration\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#VerboseThrowOnFailure","title":"Check.VerboseThrowOnFailure","content":"Check.VerboseThrowOnFailure \nVerboseThrowOnFailure \n\nCheck one property with the verbose configuration, and throw an exception if it fails or is exhausted.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#VerboseThrowOnFailureAll","title":"Check.VerboseThrowOnFailureAll","content":"Check.VerboseThrowOnFailureAll \nVerboseThrowOnFailureAll \n\n Check all public static methods on the given type that have a testable return type with the verbose configuration,\nand throws on failure or exhaustion.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#VerboseThrowOnFailureAll","title":"Check.VerboseThrowOnFailureAll","content":"Check.VerboseThrowOnFailureAll \nVerboseThrowOnFailureAll \n\n Check all public static methods on the given type that have a testable return type with the verbose configuration,\nand throws on failure or exhaustion.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-checkextensions.html","title":"CheckExtensions","content":"CheckExtensions \n \nCheckExtensions.Check \nCheck \nCheckExtensions.QuickCheck \nQuickCheck \nCheckExtensions.QuickCheck \nQuickCheck \nCheckExtensions.QuickCheckThrowOnFailure \nQuickCheckThrowOnFailure \nCheckExtensions.VerboseCheck \nVerboseCheck \nCheckExtensions.VerboseCheck \nVerboseCheck \nCheckExtensions.VerboseCheckThrowOnFailure \nVerboseCheckThrowOnFailure"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-checkextensions.html#Check","title":"CheckExtensions.Check","content":"CheckExtensions.Check \nCheck \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-checkextensions.html#QuickCheck","title":"CheckExtensions.QuickCheck","content":"CheckExtensions.QuickCheck \nQuickCheck \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-checkextensions.html#QuickCheck","title":"CheckExtensions.QuickCheck","content":"CheckExtensions.QuickCheck \nQuickCheck \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-checkextensions.html#QuickCheckThrowOnFailure","title":"CheckExtensions.QuickCheckThrowOnFailure","content":"CheckExtensions.QuickCheckThrowOnFailure \nQuickCheckThrowOnFailure \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-checkextensions.html#VerboseCheck","title":"CheckExtensions.VerboseCheck","content":"CheckExtensions.VerboseCheck \nVerboseCheck \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-checkextensions.html#VerboseCheck","title":"CheckExtensions.VerboseCheck","content":"CheckExtensions.VerboseCheck \nVerboseCheck \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-checkextensions.html#VerboseCheckThrowOnFailure","title":"CheckExtensions.VerboseCheckThrowOnFailure","content":"CheckExtensions.VerboseCheckThrowOnFailure \nVerboseCheckThrowOnFailure \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html","title":"Config","content":"Config \n\nFor configuring a run.\n \nConfig.WithArbitrary \nWithArbitrary \nConfig.WithEndSize \nWithEndSize \nConfig.WithEvery \nWithEvery \nConfig.WithEveryShrink \nWithEveryShrink \nConfig.WithMaxRejected \nWithMaxRejected \nConfig.WithMaxTest \nWithMaxTest \nConfig.WithName \nWithName \nConfig.WithParallelRunConfig \nWithParallelRunConfig \nConfig.WithQuietOnSuccess \nWithQuietOnSuccess \nConfig.WithReplay \nWithReplay \nConfig.WithRunner \nWithRunner \nConfig.WithStartSize \nWithStartSize \nConfig.ArbMap \nArbMap \nConfig.QuietOnSuccess \nQuietOnSuccess \nConfig.MaxRejected \nMaxRejected \nConfig.Every \nEvery \nConfig.EveryShrink \nEveryShrink \nConfig.EndSize \nEndSize \nConfig.Replay \nReplay \nConfig.ParallelRunConfig \nParallelRunConfig \nConfig.Runner \nRunner \nConfig.MaxTest \nMaxTest \nConfig.Name \nName \nConfig.StartSize \nStartSize \nConfig.Default \nDefault \nConfig.QuickThrowOnFailure \nQuickThrowOnFailure \nConfig.Quick \nQuick \nConfig.VerboseThrowOnFailure \nVerboseThrowOnFailure \nConfig.Verbose \nVerbose"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#WithArbitrary","title":"Config.WithArbitrary","content":"Config.WithArbitrary \nWithArbitrary \n\nReturns a new Config with specified Arbitrary\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#WithEndSize","title":"Config.WithEndSize","content":"Config.WithEndSize \nWithEndSize \n\nReturns a new Config with specified EndSize\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#WithEvery","title":"Config.WithEvery","content":"Config.WithEvery \nWithEvery \n\nReturns a new Config with specified Every function\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#WithEveryShrink","title":"Config.WithEveryShrink","content":"Config.WithEveryShrink \nWithEveryShrink \n\nReturns a new Config with specified EveryShrink function\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#WithMaxRejected","title":"Config.WithMaxRejected","content":"Config.WithMaxRejected \nWithMaxRejected \n\nReturns a new Config with specified MaxRejected\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#WithMaxTest","title":"Config.WithMaxTest","content":"Config.WithMaxTest \nWithMaxTest \n\nReturns a new Config with specified MaxTest\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#WithName","title":"Config.WithName","content":"Config.WithName \nWithName \n\nReturns a new Config with specified Name\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#WithParallelRunConfig","title":"Config.WithParallelRunConfig","content":"Config.WithParallelRunConfig \nWithParallelRunConfig \n\nReturns a new Config with specified ParallelRunConfig\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#WithQuietOnSuccess","title":"Config.WithQuietOnSuccess","content":"Config.WithQuietOnSuccess \nWithQuietOnSuccess \n\nReturns a new Config with specified QuietOnSuccess\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#WithReplay","title":"Config.WithReplay","content":"Config.WithReplay \nWithReplay \n\nReturns a new Config with specified Replay option\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#WithRunner","title":"Config.WithRunner","content":"Config.WithRunner \nWithRunner \n\nReturns a new Config with specified Runner\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#WithStartSize","title":"Config.WithStartSize","content":"Config.WithStartSize \nWithStartSize \n\nReturns a new Config with specified StartSize\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#ArbMap","title":"Config.ArbMap","content":"Config.ArbMap \nArbMap \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#QuietOnSuccess","title":"Config.QuietOnSuccess","content":"Config.QuietOnSuccess \nQuietOnSuccess \n\nIf set, suppresses the output from the test if the test is successful.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#MaxRejected","title":"Config.MaxRejected","content":"Config.MaxRejected \nMaxRejected \n\nThe maximum number of tests where values are rejected, e.g. as the result of ==\u003E\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#Every","title":"Config.Every","content":"Config.Every \nEvery \n\nWhat to print when new arguments args are generated in test n\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#EveryShrink","title":"Config.EveryShrink","content":"Config.EveryShrink \nEveryShrink \n\nWhat to print every time a counter-example is successfully shrunk\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#EndSize","title":"Config.EndSize","content":"Config.EndSize \nEndSize \n\nThe size to use for the last test, when all the tests are passing. The size increases linearly between Start- and EndSize.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#Replay","title":"Config.Replay","content":"Config.Replay \nReplay \n\nIf set, the seed to use to start testing. Allows reproduction of previous runs.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#ParallelRunConfig","title":"Config.ParallelRunConfig","content":"Config.ParallelRunConfig \nParallelRunConfig \n\nIf set, inputs for property generation and property evaluation will be run in parallel. \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#Runner","title":"Config.Runner","content":"Config.Runner \nRunner \n\nA custom test runner, e.g. to integrate with a test framework like xUnit or NUnit. \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#MaxTest","title":"Config.MaxTest","content":"Config.MaxTest \nMaxTest \n\nThe maximum number of tests that are run.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#Name","title":"Config.Name","content":"Config.Name \nName \n\nName of the test.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#StartSize","title":"Config.StartSize","content":"Config.StartSize \nStartSize \n\nThe size to use for the first test.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#Default","title":"Config.Default","content":"Config.Default \nDefault \n\nThe default configuration is the quick configuration.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#QuickThrowOnFailure","title":"Config.QuickThrowOnFailure","content":"Config.QuickThrowOnFailure \nQuickThrowOnFailure \n\nLike the Quick configuration, only throws an exception with the error message if the test fails or is exhausted.\nUseful for use within other unit testing frameworks that usually adopt this methodology to signal failure.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#Quick","title":"Config.Quick","content":"Config.Quick \nQuick \n\nThe quick configuration only prints a summary result at the end of the test.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#VerboseThrowOnFailure","title":"Config.VerboseThrowOnFailure","content":"Config.VerboseThrowOnFailure \nVerboseThrowOnFailure \n\nLike the Verbose configuration, only throws an exception with the error message if the test fails or is exhausted.\nUseful for use within other unit testing frameworks that usually adopt this methodology to signal failure.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#Verbose","title":"Config.Verbose","content":"Config.Verbose \nVerbose \n\nThe verbose configuration prints each generated argument.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-configextensions.html","title":"ConfigExtensions","content":"ConfigExtensions \n \nConfigExtensions.WithEvery \nWithEvery \nConfigExtensions.WithEveryShrink \nWithEveryShrink \nConfigExtensions.WithNoParallelRunConfig \nWithNoParallelRunConfig \nConfigExtensions.WithNoReplay \nWithNoReplay \nConfigExtensions.WithParallelRunConfig \nWithParallelRunConfig \nConfigExtensions.WithReplay \nWithReplay \nConfigExtensions.WithReplay \nWithReplay"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-configextensions.html#WithEvery","title":"ConfigExtensions.WithEvery","content":"ConfigExtensions.WithEvery \nWithEvery \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-configextensions.html#WithEveryShrink","title":"ConfigExtensions.WithEveryShrink","content":"ConfigExtensions.WithEveryShrink \nWithEveryShrink \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-configextensions.html#WithNoParallelRunConfig","title":"ConfigExtensions.WithNoParallelRunConfig","content":"ConfigExtensions.WithNoParallelRunConfig \nWithNoParallelRunConfig \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-configextensions.html#WithNoReplay","title":"ConfigExtensions.WithNoReplay","content":"ConfigExtensions.WithNoReplay \nWithNoReplay \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-configextensions.html#WithParallelRunConfig","title":"ConfigExtensions.WithParallelRunConfig","content":"ConfigExtensions.WithParallelRunConfig \nWithParallelRunConfig \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-configextensions.html#WithReplay","title":"ConfigExtensions.WithReplay","content":"ConfigExtensions.WithReplay \nWithReplay \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-configextensions.html#WithReplay","title":"ConfigExtensions.WithReplay","content":"ConfigExtensions.WithReplay \nWithReplay \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-donotshrink-1.html","title":"DoNotShrink\u003C\u0027a\u003E","content":"DoNotShrink\u003C\u0027a\u003E \n\nUse the generator for \u0027a, but don\u0027t shrink.\n \nDoNotShrink\u003C\u0027a\u003E.DoNotShrink \nDoNotShrink"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-donotshrink-1.html#DoNotShrink","title":"DoNotShrink\u003C\u0027a\u003E.DoNotShrink","content":"DoNotShrink\u003C\u0027a\u003E.DoNotShrink \nDoNotShrink \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-donotsize-1.html","title":"DoNotSize\u003C\u0027a\u003E","content":"DoNotSize\u003C\u0027a\u003E \n\nWhereas most types are restricted by a size that grows\nas the test gets further, by applying this type the underlying\ntype will ignore this size and always generate from the full range.\nNote that this only makes a difference for types that have a range -\ncurrently integer types, TimeSpan and Decimal have DoNotSize Arbitrary instances.\nThis is typically (and at least currently) only applicable for value types\nthat are comparable, hence the type constraints.\n \nDoNotSize\u003C\u0027a\u003E.Unwrap \nUnwrap \nDoNotSize\u003C\u0027a\u003E.DoNotSize \nDoNotSize"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-donotsize-1.html#Unwrap","title":"DoNotSize\u003C\u0027a\u003E.Unwrap","content":"DoNotSize\u003C\u0027a\u003E.Unwrap \nUnwrap \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-donotsize-1.html#DoNotSize","title":"DoNotSize\u003C\u0027a\u003E.DoNotSize","content":"DoNotSize\u003C\u0027a\u003E.DoNotSize \nDoNotSize \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fixedlengtharray-1.html","title":"FixedLengthArray\u003C\u0027T\u003E","content":"FixedLengthArray\u003C\u0027T\u003E \n\nRepresents an array whose length does not change when shrinking.\n \nFixedLengthArray\u003C\u0027T\u003E.Get \nGet \nFixedLengthArray\u003C\u0027T\u003E.FixedLengthArray \nFixedLengthArray"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fixedlengtharray-1.html#Get","title":"FixedLengthArray\u003C\u0027T\u003E.Get","content":"FixedLengthArray\u003C\u0027T\u003E.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fixedlengtharray-1.html#FixedLengthArray","title":"FixedLengthArray\u003C\u0027T\u003E.FixedLengthArray","content":"FixedLengthArray\u003C\u0027T\u003E.FixedLengthArray \nFixedLengthArray \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-function-2.html","title":"Function\u003C\u0027a, \u0027b\u003E","content":"Function\u003C\u0027a, \u0027b\u003E \n\nA function (F# function) that can be displayed and shrunk.\n \nFunction\u003C\u0027a, \u0027b\u003E.StructuredDisplayAsTable \nStructuredDisplayAsTable \nFunction\u003C\u0027a, \u0027b\u003E.Value \nValue \nFunction\u003C\u0027a, \u0027b\u003E.Table \nTable \nFunction\u003C\u0027a, \u0027b\u003E.From \nFrom \nFunction\u003C\u0027a, \u0027b\u003E.F \nF"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-function-2.html#StructuredDisplayAsTable","title":"Function\u003C\u0027a, \u0027b\u003E.StructuredDisplayAsTable","content":"Function\u003C\u0027a, \u0027b\u003E.StructuredDisplayAsTable \nStructuredDisplayAsTable \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-function-2.html#Value","title":"Function\u003C\u0027a, \u0027b\u003E.Value","content":"Function\u003C\u0027a, \u0027b\u003E.Value \nValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-function-2.html#Table","title":"Function\u003C\u0027a, \u0027b\u003E.Table","content":"Function\u003C\u0027a, \u0027b\u003E.Table \nTable \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-function-2.html#From","title":"Function\u003C\u0027a, \u0027b\u003E.From","content":"Function\u003C\u0027a, \u0027b\u003E.From \nFrom \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-function-2.html#F","title":"Function\u003C\u0027a, \u0027b\u003E.F","content":"Function\u003C\u0027a, \u0027b\u003E.F \nF \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-gen-1.html","title":"Gen\u003C\u0027T\u003E","content":"Gen\u003C\u0027T\u003E \n\n Generator of a random value, based on a size parameter and a randomly generated int.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-hostname.html","title":"HostName","content":"HostName \n \nHostName.HostName \nHostName"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-hostname.html#HostName","title":"HostName.HostName","content":"HostName.HostName \nHostName \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-iarbmap.html","title":"IArbMap","content":"IArbMap \n\n Maps types to Arbitrary instances for that type.\n Once constructed, the map is immutable.\n \nIArbMap.ArbFor \nArbFor \nIArbMap.ArbFor \nArbFor \nIArbMap.MergeFactory \nMergeFactory"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-iarbmap.html#ArbFor","title":"IArbMap.ArbFor","content":"IArbMap.ArbFor \nArbFor \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-iarbmap.html#ArbFor","title":"IArbMap.ArbFor","content":"IArbMap.ArbFor \nArbFor \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-iarbmap.html#MergeFactory","title":"IArbMap.MergeFactory","content":"IArbMap.MergeFactory \nMergeFactory \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-ipv4address.html","title":"IPv4Address","content":"IPv4Address \n \nIPv4Address.IPv4Address \nIPv4Address"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-ipv4address.html#IPv4Address","title":"IPv4Address.IPv4Address","content":"IPv4Address.IPv4Address \nIPv4Address \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-ipv6address.html","title":"IPv6Address","content":"IPv6Address \n \nIPv6Address.IPv6Address \nIPv6Address"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-ipv6address.html#IPv6Address","title":"IPv6Address.IPv6Address","content":"IPv6Address.IPv6Address \nIPv6Address \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-irunner.html","title":"IRunner","content":"IRunner \n\nFor implementing your own test runner.\n \nIRunner.OnArguments \nOnArguments \nIRunner.OnFinished \nOnFinished \nIRunner.OnShrink \nOnShrink \nIRunner.OnStartFixture \nOnStartFixture"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-irunner.html#OnArguments","title":"IRunner.OnArguments","content":"IRunner.OnArguments \nOnArguments \n\nCalled whenever arguments are generated and after the test is run.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-irunner.html#OnFinished","title":"IRunner.OnFinished","content":"IRunner.OnFinished \nOnFinished \n\nCalled whenever all tests are done, either Passed, Failed or Exhausted.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-irunner.html#OnShrink","title":"IRunner.OnShrink","content":"IRunner.OnShrink \nOnShrink \n\nCalled on a successful shrink.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-irunner.html#OnStartFixture","title":"IRunner.OnStartFixture","content":"IRunner.OnStartFixture \nOnStartFixture \n\nCalled before a group of properties on a type are checked.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-intwithminmax.html","title":"IntWithMinMax","content":"IntWithMinMax \n\nRepresents an int that can include int.MinValue and int.MaxValue.\n \nIntWithMinMax.Get \nGet \nIntWithMinMax.op_Explicit \nop_Explicit \nIntWithMinMax.IntWithMinMax \nIntWithMinMax"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-intwithminmax.html#Get","title":"IntWithMinMax.Get","content":"IntWithMinMax.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-intwithminmax.html#op_Explicit","title":"IntWithMinMax.op_Explicit","content":"IntWithMinMax.op_Explicit \nop_Explicit \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-intwithminmax.html#IntWithMinMax","title":"IntWithMinMax.IntWithMinMax","content":"IntWithMinMax.IntWithMinMax \nIntWithMinMax \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-interval.html","title":"Interval","content":"Interval \n\nRepresents an integer interval.\n \nInterval.Left \nLeft \nInterval.Right \nRight \nInterval.Interval \nInterval"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-interval.html#Left","title":"Interval.Left","content":"Interval.Left \nLeft \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-interval.html#Right","title":"Interval.Right","content":"Interval.Right \nRight \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-interval.html#Interval","title":"Interval.Interval","content":"Interval.Interval \nInterval \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-negativeint.html","title":"NegativeInt","content":"NegativeInt \n\nRepresents an int \u003C 0\n \nNegativeInt.Get \nGet \nNegativeInt.op_Explicit \nop_Explicit \nNegativeInt.NegativeInt \nNegativeInt"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-negativeint.html#Get","title":"NegativeInt.Get","content":"NegativeInt.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-negativeint.html#op_Explicit","title":"NegativeInt.op_Explicit","content":"NegativeInt.op_Explicit \nop_Explicit \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-negativeint.html#NegativeInt","title":"NegativeInt.NegativeInt","content":"NegativeInt.NegativeInt \nNegativeInt \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonemptyarray-1.html","title":"NonEmptyArray\u003C\u0027T\u003E","content":"NonEmptyArray\u003C\u0027T\u003E \n\nRepresents a non-empty array.\n \nNonEmptyArray\u003C\u0027T\u003E.Get \nGet \nNonEmptyArray\u003C\u0027T\u003E.NonEmptyArray \nNonEmptyArray"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonemptyarray-1.html#Get","title":"NonEmptyArray\u003C\u0027T\u003E.Get","content":"NonEmptyArray\u003C\u0027T\u003E.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonemptyarray-1.html#NonEmptyArray","title":"NonEmptyArray\u003C\u0027T\u003E.NonEmptyArray","content":"NonEmptyArray\u003C\u0027T\u003E.NonEmptyArray \nNonEmptyArray \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonemptyset-1.html","title":"NonEmptySet\u003C\u0027T\u003E","content":"NonEmptySet\u003C\u0027T\u003E \n\nRepresents a non-empty Set.\n \nNonEmptySet\u003C\u0027T\u003E.Get \nGet \nNonEmptySet\u003C\u0027T\u003E.NonEmptySet \nNonEmptySet"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonemptyset-1.html#Get","title":"NonEmptySet\u003C\u0027T\u003E.Get","content":"NonEmptySet\u003C\u0027T\u003E.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonemptyset-1.html#NonEmptySet","title":"NonEmptySet\u003C\u0027T\u003E.NonEmptySet","content":"NonEmptySet\u003C\u0027T\u003E.NonEmptySet \nNonEmptySet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonemptystring.html","title":"NonEmptyString","content":"NonEmptyString \n\nRepresents a string that is not null or empty, and does not contain any null characters (\u0027\\000\u0027)\n \nNonEmptyString.Get \nGet \nNonEmptyString.NonEmptyString \nNonEmptyString"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonemptystring.html#Get","title":"NonEmptyString.Get","content":"NonEmptyString.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonemptystring.html#NonEmptyString","title":"NonEmptyString.NonEmptyString","content":"NonEmptyString.NonEmptyString \nNonEmptyString \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonnegativeint.html","title":"NonNegativeInt","content":"NonNegativeInt \n\nRepresents an int \u003E= 0\n \nNonNegativeInt.Get \nGet \nNonNegativeInt.op_Explicit \nop_Explicit \nNonNegativeInt.NonNegativeInt \nNonNegativeInt"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonnegativeint.html#Get","title":"NonNegativeInt.Get","content":"NonNegativeInt.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonnegativeint.html#op_Explicit","title":"NonNegativeInt.op_Explicit","content":"NonNegativeInt.op_Explicit \nop_Explicit \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonnegativeint.html#NonNegativeInt","title":"NonNegativeInt.NonNegativeInt","content":"NonNegativeInt.NonNegativeInt \nNonNegativeInt \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonnull-1.html","title":"NonNull\u003C\u0027a\u003E","content":"NonNull\u003C\u0027a\u003E \n\nWrap a type in NonNull to prevent null being generated for the wrapped type.\n \nNonNull\u003C\u0027a\u003E.Get \nGet \nNonNull\u003C\u0027a\u003E.NonNull \nNonNull"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonnull-1.html#Get","title":"NonNull\u003C\u0027a\u003E.Get","content":"NonNull\u003C\u0027a\u003E.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonnull-1.html#NonNull","title":"NonNull\u003C\u0027a\u003E.NonNull","content":"NonNull\u003C\u0027a\u003E.NonNull \nNonNull \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonwhitespacestring.html","title":"NonWhiteSpaceString","content":"NonWhiteSpaceString \n \nNonWhiteSpaceString.Get \nGet \nNonWhiteSpaceString.NonWhiteSpaceString \nNonWhiteSpaceString"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonwhitespacestring.html#Get","title":"NonWhiteSpaceString.Get","content":"NonWhiteSpaceString.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonwhitespacestring.html#NonWhiteSpaceString","title":"NonWhiteSpaceString.NonWhiteSpaceString","content":"NonWhiteSpaceString.NonWhiteSpaceString \nNonWhiteSpaceString \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonzeroint.html","title":"NonZeroInt","content":"NonZeroInt \n\nRepresents an int \u003C\u003E 0\n \nNonZeroInt.Get \nGet \nNonZeroInt.op_Explicit \nop_Explicit \nNonZeroInt.NonZeroInt \nNonZeroInt"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonzeroint.html#Get","title":"NonZeroInt.Get","content":"NonZeroInt.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonzeroint.html#op_Explicit","title":"NonZeroInt.op_Explicit","content":"NonZeroInt.op_Explicit \nop_Explicit \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonzeroint.html#NonZeroInt","title":"NonZeroInt.NonZeroInt","content":"NonZeroInt.NonZeroInt \nNonZeroInt \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-normalfloat.html","title":"NormalFloat","content":"NormalFloat \n\nRepresents a float that is not NaN or Infinity.\n \nNormalFloat.Get \nGet \nNormalFloat.op_Explicit \nop_Explicit \nNormalFloat.NormalFloat \nNormalFloat"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-normalfloat.html#Get","title":"NormalFloat.Get","content":"NormalFloat.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-normalfloat.html#op_Explicit","title":"NormalFloat.op_Explicit","content":"NormalFloat.op_Explicit \nop_Explicit \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-normalfloat.html#NormalFloat","title":"NormalFloat.NormalFloat","content":"NormalFloat.NormalFloat \nNormalFloat \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-outcome.html","title":"Outcome","content":"Outcome \n \nOutcome.Failed \nFailed \nOutcome.Passed \nPassed \nOutcome.Rejected \nRejected"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-outcome.html#Failed","title":"Outcome.Failed","content":"Outcome.Failed \nFailed \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-outcome.html#Passed","title":"Outcome.Passed","content":"Outcome.Passed \nPassed \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-outcome.html#Rejected","title":"Outcome.Rejected","content":"Outcome.Rejected \nRejected \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-parallelrunconfig.html","title":"ParallelRunConfig","content":"ParallelRunConfig \n \nParallelRunConfig.MaxDegreeOfParallelism \nMaxDegreeOfParallelism"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-parallelrunconfig.html#MaxDegreeOfParallelism","title":"ParallelRunConfig.MaxDegreeOfParallelism","content":"ParallelRunConfig.MaxDegreeOfParallelism \nMaxDegreeOfParallelism \n\n For I/O bound work 1 would be fine, for cpu intensive tasks Environment.ProcessorCount appears to be fastest option\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-positiveint.html","title":"PositiveInt","content":"PositiveInt \n\nRepresents an int \u003E 0\n \nPositiveInt.Get \nGet \nPositiveInt.op_Explicit \nop_Explicit \nPositiveInt.PositiveInt \nPositiveInt"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-positiveint.html#Get","title":"PositiveInt.Get","content":"PositiveInt.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-positiveint.html#op_Explicit","title":"PositiveInt.op_Explicit","content":"PositiveInt.op_Explicit \nop_Explicit \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-positiveint.html#PositiveInt","title":"PositiveInt.PositiveInt","content":"PositiveInt.PositiveInt \nPositiveInt \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-property.html","title":"Property","content":"Property \n\nA Property can be checked by FsCheck.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-replay.html","title":"Replay","content":"Replay \n \nReplay.Rnd \nRnd \nReplay.Size \nSize"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-replay.html#Rnd","title":"Replay.Rnd","content":"Replay.Rnd \nRnd \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-replay.html#Size","title":"Replay.Size","content":"Replay.Size \nSize \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-result.html","title":"Result","content":"Result \n\nThe result of one execution of a property.\n \nResult.Outcome \nOutcome \nResult.Stamp \nStamp \nResult.Labels \nLabels \nResult.Arguments \nArguments"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-result.html#Outcome","title":"Result.Outcome","content":"Result.Outcome \nOutcome \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-result.html#Stamp","title":"Result.Stamp","content":"Result.Stamp \nStamp \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-result.html#Labels","title":"Result.Labels","content":"Result.Labels \nLabels \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-result.html#Arguments","title":"Result.Arguments","content":"Result.Arguments \nArguments \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-resultcontainer.html","title":"ResultContainer","content":"ResultContainer \n \nResultContainer.( \u0026\u0026\u0026 ) \n( \u0026\u0026\u0026 ) \nResultContainer.( ||| ) \n( ||| ) \nResultContainer.Value \nValue \nResultContainer.Future \nFuture"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-resultcontainer.html#( \u0026\u0026\u0026 )","title":"ResultContainer.( \u0026\u0026\u0026 )","content":"ResultContainer.( \u0026\u0026\u0026 ) \n( \u0026\u0026\u0026 ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-resultcontainer.html#( ||| )","title":"ResultContainer.( ||| )","content":"ResultContainer.( ||| ) \n( ||| ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-resultcontainer.html#Value","title":"ResultContainer.Value","content":"ResultContainer.Value \nValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-resultcontainer.html#Future","title":"ResultContainer.Future","content":"ResultContainer.Future \nFuture \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-rnd.html","title":"Rnd","content":"Rnd \n \nRnd.( .ctor ) \n( .ctor ) \nRnd.( .ctor ) \n( .ctor ) \nRnd.Seed \nSeed \nRnd.Gamma \nGamma"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-rnd.html#( .ctor )","title":"Rnd.( .ctor )","content":"Rnd.( .ctor ) \n( .ctor ) \n\n Create a new Rnd value with the specified seed value and the \u0027golden\u0027 gamma.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-rnd.html#( .ctor )","title":"Rnd.( .ctor )","content":"Rnd.( .ctor ) \n( .ctor ) \n\n Create a new random number generator with the given seed and gamma.\n Useful to faithfully reproduce a sequence or part of it. gamma must be odd,\n or this throws invalid argument exception. For good pseudo-random properties,\n please only use seeds and gamma that were generated as part of a sequence\n started with the default create function.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-rnd.html#Seed","title":"Rnd.Seed","content":"Rnd.Seed \nSeed \n\n Seed value for the random number generator.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-rnd.html#Gamma","title":"Rnd.Gamma","content":"Rnd.Gamma \nGamma \n\n An odd integer\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-stringnonullchar.html","title":"StringNoNullChar","content":"StringNoNullChar \n\nRepresents a string that does not contain null characters (\u0027\\000\u0027)\n \nStringNoNullChar.Get \nGet \nStringNoNullChar.StringNoNullChar \nStringNoNullChar"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-stringnonullchar.html#Get","title":"StringNoNullChar.Get","content":"StringNoNullChar.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-stringnonullchar.html#StringNoNullChar","title":"StringNoNullChar.StringNoNullChar","content":"StringNoNullChar.StringNoNullChar \nStringNoNullChar \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-testdata.html","title":"TestData","content":"TestData \n \nTestData.NumberOfTests \nNumberOfTests \nTestData.NumberOfShrinks \nNumberOfShrinks \nTestData.Stamps \nStamps \nTestData.Labels \nLabels"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-testdata.html#NumberOfTests","title":"TestData.NumberOfTests","content":"TestData.NumberOfTests \nNumberOfTests \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-testdata.html#NumberOfShrinks","title":"TestData.NumberOfShrinks","content":"TestData.NumberOfShrinks \nNumberOfShrinks \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-testdata.html#Stamps","title":"TestData.Stamps","content":"TestData.Stamps \nStamps \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-testdata.html#Labels","title":"TestData.Labels","content":"TestData.Labels \nLabels \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-testresult.html","title":"TestResult","content":"TestResult \n \nTestResult.Passed \nPassed \nTestResult.Failed \nFailed \nTestResult.Exhausted \nExhausted"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-testresult.html#Passed","title":"TestResult.Passed","content":"TestResult.Passed \nPassed \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-testresult.html#Failed","title":"TestResult.Failed","content":"TestResult.Failed \nFailed \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-testresult.html#Exhausted","title":"TestResult.Exhausted","content":"TestResult.Exhausted \nExhausted \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-throwingfunction-2.html","title":"ThrowingFunction\u003C\u0027a, \u0027b\u003E","content":"ThrowingFunction\u003C\u0027a, \u0027b\u003E \n \nThrowingFunction\u003C\u0027a, \u0027b\u003E.Get \nGet \nThrowingFunction\u003C\u0027a, \u0027b\u003E.ThrowingFunction \nThrowingFunction"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-throwingfunction-2.html#Get","title":"ThrowingFunction\u003C\u0027a, \u0027b\u003E.Get","content":"ThrowingFunction\u003C\u0027a, \u0027b\u003E.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-throwingfunction-2.html#ThrowingFunction","title":"ThrowingFunction\u003C\u0027a, \u0027b\u003E.ThrowingFunction","content":"ThrowingFunction\u003C\u0027a, \u0027b\u003E.ThrowingFunction \nThrowingFunction \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-unicodechar.html","title":"UnicodeChar","content":"UnicodeChar \n\nRepresents a unicode char.\n \nUnicodeChar.Get \nGet \nUnicodeChar.op_Explicit \nop_Explicit \nUnicodeChar.UnicodeChar \nUnicodeChar"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-unicodechar.html#Get","title":"UnicodeChar.Get","content":"UnicodeChar.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-unicodechar.html#op_Explicit","title":"UnicodeChar.op_Explicit","content":"UnicodeChar.op_Explicit \nop_Explicit \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-unicodechar.html#UnicodeChar","title":"UnicodeChar.UnicodeChar","content":"UnicodeChar.UnicodeChar \nUnicodeChar \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-unicodestring.html","title":"UnicodeString","content":"UnicodeString \n\nRepresents a string that can contain unicode characters.\n \nUnicodeString.Get \nGet \nUnicodeString.UnicodeString \nUnicodeString"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-unicodestring.html#Get","title":"UnicodeString.Get","content":"UnicodeString.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-unicodestring.html#UnicodeString","title":"UnicodeString.UnicodeString","content":"UnicodeString.UnicodeString \nUnicodeString \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-xmlencodedstring.html","title":"XmlEncodedString","content":"XmlEncodedString \n\nRepresents a string that can be serializable as a XML value.\n \nXmlEncodedString.Get \nGet \nXmlEncodedString.XmlEncodedString \nXmlEncodedString"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-xmlencodedstring.html#Get","title":"XmlEncodedString.Get","content":"XmlEncodedString.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-xmlencodedstring.html#XmlEncodedString","title":"XmlEncodedString.XmlEncodedString","content":"XmlEncodedString.XmlEncodedString \nXmlEncodedString \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachine.html","title":"StateMachine","content":"StateMachine \n \nStateMachine.setup \nsetup \nStateMachine.setupFunc \nsetupFunc \nStateMachine.tearDown \ntearDown \nStateMachine.tearDownAction \ntearDownAction \nStateMachine.operationWithPrecondition \noperationWithPrecondition \nStateMachine.operation \noperation \nStateMachine.operationProp \noperationProp \nStateMachine.operationBool \noperationBool \nStateMachine.operationAction \noperationAction \nStateMachine.generate \ngenerate \nStateMachine.shrink \nshrink \nStateMachine.forOne \nforOne \nStateMachine.forAll \nforAll \nStateMachine.toProperty \ntoProperty"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachine.html#setup","title":"StateMachine.setup","content":"StateMachine.setup \nsetup \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachine.html#setupFunc","title":"StateMachine.setupFunc","content":"StateMachine.setupFunc \nsetupFunc \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachine.html#tearDown","title":"StateMachine.tearDown","content":"StateMachine.tearDown \ntearDown \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachine.html#tearDownAction","title":"StateMachine.tearDownAction","content":"StateMachine.tearDownAction \ntearDownAction \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachine.html#operationWithPrecondition","title":"StateMachine.operationWithPrecondition","content":"StateMachine.operationWithPrecondition \noperationWithPrecondition \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachine.html#operation","title":"StateMachine.operation","content":"StateMachine.operation \noperation \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachine.html#operationProp","title":"StateMachine.operationProp","content":"StateMachine.operationProp \noperationProp \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachine.html#operationBool","title":"StateMachine.operationBool","content":"StateMachine.operationBool \noperationBool \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachine.html#operationAction","title":"StateMachine.operationAction","content":"StateMachine.operationAction \noperationAction \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachine.html#generate","title":"StateMachine.generate","content":"StateMachine.generate \ngenerate \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachine.html#shrink","title":"StateMachine.shrink","content":"StateMachine.shrink \nshrink \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachine.html#forOne","title":"StateMachine.forOne","content":"StateMachine.forOne \nforOne \n\n Check one run, i.e. create a property from a single run.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachine.html#forAll","title":"StateMachine.forAll","content":"StateMachine.forAll \nforAll \n\nCheck all generated runs, i.e. create a property from an arbitrarily generated run.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachine.html#toProperty","title":"StateMachine.toProperty","content":"StateMachine.toProperty \ntoProperty \n\nTurn a machine specification into a property.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-disposecall-1.html","title":"DisposeCall\u003C\u0027Actual\u003E","content":"DisposeCall\u003C\u0027Actual\u003E \n \nDisposeCall\u003C\u0027Actual\u003E.( .ctor ) \n( .ctor )"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-disposecall-1.html#( .ctor )","title":"DisposeCall\u003C\u0027Actual\u003E.( .ctor )","content":"DisposeCall\u003C\u0027Actual\u003E.( .ctor ) \n( .ctor ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-ioperation.html","title":"IOperation","content":"IOperation \n \nIOperation.ClearDependencies \nClearDependencies \nIOperation.Gets \nGets \nIOperation.Sets \nSets \nIOperation.Needs \nNeeds \nIOperation.Provides \nProvides"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-ioperation.html#ClearDependencies","title":"IOperation.ClearDependencies","content":"IOperation.ClearDependencies \nClearDependencies \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-ioperation.html#Gets","title":"IOperation.Gets","content":"IOperation.Gets \nGets \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-ioperation.html#Sets","title":"IOperation.Sets","content":"IOperation.Sets \nSets \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-ioperation.html#Needs","title":"IOperation.Needs","content":"IOperation.Needs \nNeeds \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-ioperation.html#Provides","title":"IOperation.Provides","content":"IOperation.Provides \nProvides \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-ioperationresult.html","title":"IOperationResult","content":"IOperationResult \n \nIOperationResult.Reset \nReset"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-ioperationresult.html#Reset","title":"IOperationResult.Reset","content":"IOperationResult.Reset \nReset \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-machine-2.html","title":"Machine\u003C\u0027Actual, \u0027Model\u003E","content":"Machine\u003C\u0027Actual, \u0027Model\u003E \n\nDefines the initial state for actual and model object, and allows to define the generator to use\nfor the next state, based on the model.\n \nMachine\u003C\u0027Actual, \u0027Model\u003E.( .ctor ) \n( .ctor ) \nMachine\u003C\u0027Actual, \u0027Model\u003E.( .ctor ) \n( .ctor ) \nMachine\u003C\u0027Actual, \u0027Model\u003E.Next \nNext \nMachine\u003C\u0027Actual, \u0027Model\u003E.ShrinkOperations \nShrinkOperations \nMachine\u003C\u0027Actual, \u0027Model\u003E.Setup \nSetup \nMachine\u003C\u0027Actual, \u0027Model\u003E.TearDown \nTearDown \nMachine\u003C\u0027Actual, \u0027Model\u003E.MaxNumberOfCommands \nMaxNumberOfCommands"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-machine-2.html#( .ctor )","title":"Machine\u003C\u0027Actual, \u0027Model\u003E.( .ctor )","content":"Machine\u003C\u0027Actual, \u0027Model\u003E.( .ctor ) \n( .ctor ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-machine-2.html#( .ctor )","title":"Machine\u003C\u0027Actual, \u0027Model\u003E.( .ctor )","content":"Machine\u003C\u0027Actual, \u0027Model\u003E.( .ctor ) \n( .ctor ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-machine-2.html#Next","title":"Machine\u003C\u0027Actual, \u0027Model\u003E.Next","content":"Machine\u003C\u0027Actual, \u0027Model\u003E.Next \nNext \n\nGenerate a number of possible commands based on the current state of the model. \nPreconditions are still checked, so even if a Command is returned, it is not chosen\nif its precondition does not hold.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-machine-2.html#ShrinkOperations","title":"Machine\u003C\u0027Actual, \u0027Model\u003E.ShrinkOperations","content":"Machine\u003C\u0027Actual, \u0027Model\u003E.ShrinkOperations \nShrinkOperations \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-machine-2.html#Setup","title":"Machine\u003C\u0027Actual, \u0027Model\u003E.Setup","content":"Machine\u003C\u0027Actual, \u0027Model\u003E.Setup \nSetup \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-machine-2.html#TearDown","title":"Machine\u003C\u0027Actual, \u0027Model\u003E.TearDown","content":"Machine\u003C\u0027Actual, \u0027Model\u003E.TearDown \nTearDown \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-machine-2.html#MaxNumberOfCommands","title":"Machine\u003C\u0027Actual, \u0027Model\u003E.MaxNumberOfCommands","content":"Machine\u003C\u0027Actual, \u0027Model\u003E.MaxNumberOfCommands \nMaxNumberOfCommands \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-machinerun-2.html","title":"MachineRun\u003C\u0027Actual, \u0027Model\u003E","content":"MachineRun\u003C\u0027Actual, \u0027Model\u003E \n \nMachineRun\u003C\u0027Actual, \u0027Model\u003E.StructuredToString \nStructuredToString \nMachineRun\u003C\u0027Actual, \u0027Model\u003E.Setup \nSetup \nMachineRun\u003C\u0027Actual, \u0027Model\u003E.Operations \nOperations \nMachineRun\u003C\u0027Actual, \u0027Model\u003E.TearDown \nTearDown \nMachineRun\u003C\u0027Actual, \u0027Model\u003E.UsedSize \nUsedSize"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-machinerun-2.html#StructuredToString","title":"MachineRun\u003C\u0027Actual, \u0027Model\u003E.StructuredToString","content":"MachineRun\u003C\u0027Actual, \u0027Model\u003E.StructuredToString \nStructuredToString \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-machinerun-2.html#Setup","title":"MachineRun\u003C\u0027Actual, \u0027Model\u003E.Setup","content":"MachineRun\u003C\u0027Actual, \u0027Model\u003E.Setup \nSetup \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-machinerun-2.html#Operations","title":"MachineRun\u003C\u0027Actual, \u0027Model\u003E.Operations","content":"MachineRun\u003C\u0027Actual, \u0027Model\u003E.Operations \nOperations \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-machinerun-2.html#TearDown","title":"MachineRun\u003C\u0027Actual, \u0027Model\u003E.TearDown","content":"MachineRun\u003C\u0027Actual, \u0027Model\u003E.TearDown \nTearDown \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-machinerun-2.html#UsedSize","title":"MachineRun\u003C\u0027Actual, \u0027Model\u003E.UsedSize","content":"MachineRun\u003C\u0027Actual, \u0027Model\u003E.UsedSize \nUsedSize \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-methodcall-1.html","title":"MethodCall\u003C\u0027Actual\u003E","content":"MethodCall\u003C\u0027Actual\u003E \n \nMethodCall\u003C\u0027Actual\u003E.( .ctor ) \n( .ctor )"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-methodcall-1.html#( .ctor )","title":"MethodCall\u003C\u0027Actual\u003E.( .ctor )","content":"MethodCall\u003C\u0027Actual\u003E.( .ctor ) \n( .ctor ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-new-1.html","title":"New\u003C\u0027Actual\u003E","content":"New\u003C\u0027Actual\u003E \n \nNew\u003C\u0027Actual\u003E.( .ctor ) \n( .ctor )"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-new-1.html#( .ctor )","title":"New\u003C\u0027Actual\u003E.( .ctor )","content":"New\u003C\u0027Actual\u003E.( .ctor ) \n( .ctor ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-objectmachine-1.html","title":"ObjectMachine\u003C\u0027Actual\u003E","content":"ObjectMachine\u003C\u0027Actual\u003E \n \nObjectMachine\u003C\u0027Actual\u003E.( .ctor ) \n( .ctor )"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-objectmachine-1.html#( .ctor )","title":"ObjectMachine\u003C\u0027Actual\u003E.( .ctor )","content":"ObjectMachine\u003C\u0027Actual\u003E.( .ctor ) \n( .ctor ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-objectmachinemodel.html","title":"ObjectMachineModel","content":"ObjectMachineModel \n \nObjectMachineModel.Item1 \nItem1 \nObjectMachineModel.Item2 \nItem2 \nObjectMachineModel.Item3 \nItem3"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-objectmachinemodel.html#Item1","title":"ObjectMachineModel.Item1","content":"ObjectMachineModel.Item1 \nItem1 \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-objectmachinemodel.html#Item2","title":"ObjectMachineModel.Item2","content":"ObjectMachineModel.Item2 \nItem2 \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-objectmachinemodel.html#Item3","title":"ObjectMachineModel.Item3","content":"ObjectMachineModel.Item3 \nItem3 \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-operation-2.html","title":"Operation\u003C\u0027Actual, \u0027Model\u003E","content":"Operation\u003C\u0027Actual, \u0027Model\u003E \n\nAn operation describes pre and post conditions and the model for a single operation under test.\nThe post-conditions are the invariants that will be checked; when these do not hold the test fails.\n \nOperation\u003C\u0027Actual, \u0027Model\u003E.( .ctor ) \n( .ctor ) \nOperation\u003C\u0027Actual, \u0027Model\u003E.Check \nCheck \nOperation\u003C\u0027Actual, \u0027Model\u003E.Pre \nPre \nOperation\u003C\u0027Actual, \u0027Model\u003E.Run \nRun"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-operation-2.html#( .ctor )","title":"Operation\u003C\u0027Actual, \u0027Model\u003E.( .ctor )","content":"Operation\u003C\u0027Actual, \u0027Model\u003E.( .ctor ) \n( .ctor ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-operation-2.html#Check","title":"Operation\u003C\u0027Actual, \u0027Model\u003E.Check","content":"Operation\u003C\u0027Actual, \u0027Model\u003E.Check \nCheck \n\nExecutes the command on the object under test, and returns a property that must hold.\nThis property typically compares the state of the model with the state of the object after\nexecution of the command.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-operation-2.html#Pre","title":"Operation\u003C\u0027Actual, \u0027Model\u003E.Pre","content":"Operation\u003C\u0027Actual, \u0027Model\u003E.Pre \nPre \n\nOptional precondition for execution of the command. When this does not hold, the test continues\nbut the command is not executed.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-operation-2.html#Run","title":"Operation\u003C\u0027Actual, \u0027Model\u003E.Run","content":"Operation\u003C\u0027Actual, \u0027Model\u003E.Run \nRun \n\nExecutes the command on the model of the object.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-operationresult-1.html","title":"OperationResult\u003C\u0027a\u003E","content":"OperationResult\u003C\u0027a\u003E \n \nOperationResult\u003C\u0027a\u003E.( .ctor ) \n( .ctor ) \nOperationResult\u003C\u0027a\u003E.V \nV \nOperationResult\u003C\u0027a\u003E.Counter \nCounter"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-operationresult-1.html#( .ctor )","title":"OperationResult\u003C\u0027a\u003E.( .ctor )","content":"OperationResult\u003C\u0027a\u003E.( .ctor ) \n( .ctor ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-operationresult-1.html#V","title":"OperationResult\u003C\u0027a\u003E.V","content":"OperationResult\u003C\u0027a\u003E.V \nV \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-operationresult-1.html#Counter","title":"OperationResult\u003C\u0027a\u003E.Counter","content":"OperationResult\u003C\u0027a\u003E.Counter \nCounter \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-setup-2.html","title":"Setup\u003C\u0027Actual, \u0027Model\u003E","content":"Setup\u003C\u0027Actual, \u0027Model\u003E \n \nSetup\u003C\u0027Actual, \u0027Model\u003E.( .ctor ) \n( .ctor ) \nSetup\u003C\u0027Actual, \u0027Model\u003E.Actual \nActual \nSetup\u003C\u0027Actual, \u0027Model\u003E.Model \nModel"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-setup-2.html#( .ctor )","title":"Setup\u003C\u0027Actual, \u0027Model\u003E.( .ctor )","content":"Setup\u003C\u0027Actual, \u0027Model\u003E.( .ctor ) \n( .ctor ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-setup-2.html#Actual","title":"Setup\u003C\u0027Actual, \u0027Model\u003E.Actual","content":"Setup\u003C\u0027Actual, \u0027Model\u003E.Actual \nActual \n\nRandomly generate the initial state of the actual object. Should still correspond to the \ninitial state of model object; so you should only randomly generate parameters to the instance\nthat don\u0027t affect the model.\nNote:make sure that each value is truly a new instance if the commands change the state\nof the object. Gen.connstant in particular is a bad idea - use Gen.fresh instead.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-setup-2.html#Model","title":"Setup\u003C\u0027Actual, \u0027Model\u003E.Model","content":"Setup\u003C\u0027Actual, \u0027Model\u003E.Model \nModel \n\nInitial state of model object. Must correspond to initial state of actual object.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachineextensions.html","title":"StateMachineExtensions","content":"StateMachineExtensions \n \nStateMachineExtensions.ToProperty \nToProperty \nStateMachineExtensions.ToProperty \nToProperty \nStateMachineExtensions.ToProperty \nToProperty"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachineextensions.html#ToProperty","title":"StateMachineExtensions.ToProperty","content":"StateMachineExtensions.ToProperty \nToProperty \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachineextensions.html#ToProperty","title":"StateMachineExtensions.ToProperty","content":"StateMachineExtensions.ToProperty \nToProperty \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachineextensions.html#ToProperty","title":"StateMachineExtensions.ToProperty","content":"StateMachineExtensions.ToProperty \nToProperty \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-stopoperation-2.html","title":"StopOperation\u003C\u0027Actual, \u0027Model\u003E","content":"StopOperation\u003C\u0027Actual, \u0027Model\u003E \n \nStopOperation\u003C\u0027Actual, \u0027Model\u003E.( .ctor ) \n( .ctor )"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-stopoperation-2.html#( .ctor )","title":"StopOperation\u003C\u0027Actual, \u0027Model\u003E.( .ctor )","content":"StopOperation\u003C\u0027Actual, \u0027Model\u003E.( .ctor ) \n( .ctor ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-teardown-1.html","title":"TearDown\u003C\u0027Actual\u003E","content":"TearDown\u003C\u0027Actual\u003E \n \nTearDown\u003C\u0027Actual\u003E.( .ctor ) \n( .ctor ) \nTearDown\u003C\u0027Actual\u003E.Actual \nActual"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-teardown-1.html#( .ctor )","title":"TearDown\u003C\u0027Actual\u003E.( .ctor )","content":"TearDown\u003C\u0027Actual\u003E.( .ctor ) \n( .ctor ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-teardown-1.html#Actual","title":"TearDown\u003C\u0027Actual\u003E.Actual","content":"TearDown\u003C\u0027Actual\u003E.Actual \nActual \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html","title":"Arb","content":"Arb \n \nArb.toGen \ntoGen \nArb.toShrink \ntoShrink \nArb.fromGen \nfromGen \nArb.fromGenShrink \nfromGenShrink \nArb.convert \nconvert \nArb.filter \nfilter \nArb.mapFilter \nmapFilter \nArb.zip \nzip \nArb.array \narray \nArb.option \noption \nArb.nullable \nnullable \nArb.list \nlist \nArb.pureFunction \npureFunction \nArb.throwingFunction \nthrowingFunction \nArb.set \nset \nArb.mapKV \nmapKV"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html#toGen","title":"Arb.toGen","content":"Arb.toGen \ntoGen \n\n Get the Gen from the given Arbitary.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html#toShrink","title":"Arb.toShrink","content":"Arb.toShrink \ntoShrink \n\n Get the shrinker function from the given Arbitrary.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html#fromGen","title":"Arb.fromGen","content":"Arb.fromGen \nfromGen \n\n Construct an Arbitrary instance from a generator.\n Shrink is not supported for this type.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html#fromGenShrink","title":"Arb.fromGenShrink","content":"Arb.fromGenShrink \nfromGenShrink \n\n Construct an Arbitrary instance from a generator and shrinker.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html#convert","title":"Arb.convert","content":"Arb.convert \nconvert \n\n Construct an Arbitrary instance for a type that can be mapped to and from another type (e.g. a wrapper),\n based on a Arbitrary instance for the source type and two mapping functions.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html#filter","title":"Arb.filter","content":"Arb.filter \nfilter \n\n Return an Arbitrary instance that is a filtered version of an existing arbitrary instance.\n The generator uses Gen.where, and the shrinks are filtered using Seq.filter with the given predicate.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html#mapFilter","title":"Arb.mapFilter","content":"Arb.mapFilter \nmapFilter \n\n Return an Arbitrary instance that is a mapped and filtered version of an existing arbitrary instance.\n The generator uses Gen.map with the given mapper and then Gen.where with the given predicate,\n and the shrinks are filtered using Seq.filter with the given predicate.\n This is sometimes useful if using just a filter would reduce the chance of getting a good value\n from the generator - and you can map the value instead. E.g. PositiveInt.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html#zip","title":"Arb.zip","content":"Arb.zip \nzip \n\n Generates 2-tuples.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html#array","title":"Arb.array","content":"Arb.array \narray \n\n Generates one-dimensional arrays. \n The length of the generated array is between 0 and size.\n The sum of the sizes of the elements is equal to the size of the generated array.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html#option","title":"Arb.option","content":"Arb.option \noption \n\n Generates option values that are None 1/8 of the time.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html#nullable","title":"Arb.nullable","content":"Arb.nullable \nnullable \n\n Generates nullable values that are null 1/8 of the time.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html#list","title":"Arb.list","content":"Arb.list \nlist \n\n Generates FSharp.Core list\u003C\u0027T\u003E values. \n The length of the generated list is between 0 and size. \n The sum of the sizes of the elements is equal to the size of the generated list.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html#pureFunction","title":"Arb.pureFunction","content":"Arb.pureFunction \npureFunction \n\n Generates pure functions that produce the given output values \u0027U. \n There is no shrinking for functions.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html#throwingFunction","title":"Arb.throwingFunction","content":"Arb.throwingFunction \nthrowingFunction \n\n Generates F# function values that generate an instance of the function result type about half the time. The other \n times it generate one of the given exceptions.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html#set","title":"Arb.set","content":"Arb.set \nset \n\n Generates Set\u003C\u0027T\u003E values.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html#mapKV","title":"Arb.mapKV","content":"Arb.mapKV \nmapKV \n\n Generates Map\u003CTKey,TValue\u003E values.\n Not named \u0060map\u0060 because that has other meanings.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arbmap.html","title":"ArbMap","content":"ArbMap \n \nArbMap.defaults \ndefaults \nArbMap.mergeWithType \nmergeWithType \nArbMap.mergeWith \nmergeWith \nArbMap.mergeFactory \nmergeFactory \nArbMap.mergeArbFactory \nmergeArbFactory \nArbMap.mergeMapFactory \nmergeMapFactory \nArbMap.mergeArb \nmergeArb \nArbMap.arbitrary \narbitrary \nArbMap.generate \ngenerate"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arbmap.html#defaults","title":"ArbMap.defaults","content":"ArbMap.defaults \ndefaults \n\n The immutable default mapping from a type to Arbitrary for that type.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arbmap.html#mergeWithType","title":"ArbMap.mergeWithType","content":"ArbMap.mergeWithType \nmergeWithType \n\n Return a new Type to Arbitrary map that merges the existing map with new Arbitrary\u003C\u0027T\u003E instances\n discovered on the given Type. See mergeWith\u003C\u0027TArb\u003E for more info on what the shape of instancesType can be.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arbmap.html#mergeWith","title":"ArbMap.mergeWith","content":"ArbMap.mergeWith \nmergeWith \n\n Return a new Type to Arbitrary map that merges the existing map with new Arbitrary\u003C\u0027T\u003E instances\n discovered on the given type argument \u0027TArb.\n The new Arbitrary instances take precedence over the ones for the same type\n in the existing map.\n\n instancesType should have static methods or properties that return Arbitrary\u003C\u0027T\u003E\n instances. The methods or properties can have any name, and there can be any number of them.\n\n A method may return Arbitrary instances for generic types, e.g. Arbitrary\u003CKeyValuePair\u003C\u0027K,\u0027V\u003E\u003E.\n In that case, the implementation needs to obtain an Arbitrary\u003C\u0027Key\u003E and Arbitrary\u003C\u0027Value\u003E - it can declare\n parameters of type Arbitrary\u003C\u0027T\u003E to obtain them. Arbitrary instance of the correct type are automatically\n injected on construction of a particular type.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arbmap.html#mergeFactory","title":"ArbMap.mergeFactory","content":"ArbMap.mergeFactory \nmergeFactory \n\n Return a new Type to Arbitrary map that merges the existing map with the Arbitrary\u003C\u0027T\u003E returned by the given function.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arbmap.html#mergeArbFactory","title":"ArbMap.mergeArbFactory","content":"ArbMap.mergeArbFactory \nmergeArbFactory \n\n Return a new Type to Arbitrary map that merges the existing map with the Arbitrary\u003C\u0027T\u003E returned by the given function.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arbmap.html#mergeMapFactory","title":"ArbMap.mergeMapFactory","content":"ArbMap.mergeMapFactory \nmergeMapFactory \n\n Return a new Type to Arbitrary map that merges the existing map with the Arbitrary\u003C\u0027T\u003E returned by the given function.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arbmap.html#mergeArb","title":"ArbMap.mergeArb","content":"ArbMap.mergeArb \nmergeArb \n\n Return a new Type to Arbitrary map that merges the existing map with the provided Arbitrary\u003C\u0027T\u003E instance.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arbmap.html#arbitrary","title":"ArbMap.arbitrary","content":"ArbMap.arbitrary \narbitrary \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arbmap.html#generate","title":"ArbMap.generate","content":"ArbMap.generate \ngenerate \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arbpatterns.html","title":"ArbPatterns","content":"ArbPatterns \n \nArbPatterns.( |Fun| ) \n( |Fun| )"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arbpatterns.html#( |Fun| )","title":"ArbPatterns.( |Fun| )","content":"ArbPatterns.( |Fun| ) \n( |Fun| ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html","title":"Gen","content":"Gen \n \nGen.constant \nconstant \nGen.map \nmap \nGen.fresh \nfresh \nGen.apply \napply \nGen.bind \nbind \nGen.map2 \nmap2 \nGen.map3 \nmap3 \nGen.map4 \nmap4 \nGen.map5 \nmap5 \nGen.map6 \nmap6 \nGen.sized \nsized \nGen.resize \nresize \nGen.scaleSize \nscaleSize \nGen.sampleWithSeed \nsampleWithSeed \nGen.sampleWithSize \nsampleWithSize \nGen.sample \nsample \nGen.choose \nchoose \nGen.choose64 \nchoose64 \nGen.elements \nelements \nGen.growingElements \ngrowingElements \nGen.oneof \noneof \nGen.frequency \nfrequency \nGen.two \ntwo \nGen.three \nthree \nGen.four \nfour \nGen.zip \nzip \nGen.zip3 \nzip3 \nGen.collectToList \ncollectToList \nGen.collectToArray \ncollectToArray \nGen.collectToSeq \ncollectToSeq \nGen.sequenceToList \nsequenceToList \nGen.sequenceToArray \nsequenceToArray \nGen.sequenceToSeq \nsequenceToSeq \nGen.tryWhere \ntryWhere \nGen.tryFilter \ntryFilter \nGen.where \nwhere \nGen.filter \nfilter \nGen.shuffle \nshuffle \nGen.piles \npiles \nGen.listOfLength \nlistOfLength \nGen.listOf \nlistOf \nGen.nonEmptyListOf \nnonEmptyListOf \nGen.arrayOfLength \narrayOfLength \nGen.arrayOf \narrayOf \nGen.array2DOfDim \narray2DOfDim \nGen.array2DOf \narray2DOf \nGen.subListOf \nsubListOf \nGen.optionOf \noptionOf"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#constant","title":"Gen.constant","content":"Gen.constant \nconstant \n\n Always generate the same given value. See also fresh.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#map","title":"Gen.map","content":"Gen.map \nmap \n\n Create a new generator by applying f to each value in the given generator.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#fresh","title":"Gen.fresh","content":"Gen.fresh \nfresh \n\n Generate fresh instances by calling create every time the generator \n generates a new value. Useful for generating new instances of mutable\n objects.\n See also constant.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#apply","title":"Gen.apply","content":"Gen.apply \napply \n\n Apply the functions f from the first generator to the values from the second generator pairwise,\n yielding a new generator that generates the results.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#bind","title":"Gen.bind","content":"Gen.bind \nbind \n\n Creates a new generator that generates values from the source generator, \n applies the function k to them, and generates values from the resulting generator.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#map2","title":"Gen.map2","content":"Gen.map2 \nmap2 \n\n Create a new generator by applying f to each value in the given generators.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#map3","title":"Gen.map3","content":"Gen.map3 \nmap3 \n\n Create a new generator by applying f to each value in the given generators.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#map4","title":"Gen.map4","content":"Gen.map4 \nmap4 \n\n Create a new generator by applying f to each value in the given generators.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#map5","title":"Gen.map5","content":"Gen.map5 \nmap5 \n\n Create a new generator by applying f to each value in the given generators.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#map6","title":"Gen.map6","content":"Gen.map6 \nmap6 \n\n Create a new generator by applying f to each value in the given generators.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#sized","title":"Gen.sized","content":"Gen.sized \nsized \n\n Obtain the current size. sized g calls g, passing it the current size as a parameter.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#resize","title":"Gen.resize","content":"Gen.resize \nresize \n\n Override the current size of the test. resize n g invokes generator g with size parameter n.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#scaleSize","title":"Gen.scaleSize","content":"Gen.scaleSize \nscaleSize \n\n Modify a size using the given function before passing it to the given Gen.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#sampleWithSeed","title":"Gen.sampleWithSeed","content":"Gen.sampleWithSeed \nsampleWithSeed \n\n Generates n values of the given size and starting with the given seed.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#sampleWithSize","title":"Gen.sampleWithSize","content":"Gen.sampleWithSize \nsampleWithSize \n\n Generates a given number of values with a new seed and a given size.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#sample","title":"Gen.sample","content":"Gen.sample \nsample \n\n Generates a given number of values with a new seed and a size of 50.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#choose","title":"Gen.choose","content":"Gen.choose \nchoose \n\n Generates ints between l and h, inclusive.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#choose64","title":"Gen.choose64","content":"Gen.choose64 \nchoose64 \n\n Generates int64 between l and h, inclusive.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#elements","title":"Gen.elements","content":"Gen.elements \nelements \n\nBuild a generator that randomly generates one of the values in the given non-empty, finite seq.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#growingElements","title":"Gen.growingElements","content":"Gen.growingElements \ngrowingElements \n\nBuild a generator that takes a non-empty sequence and randomly generates\none of the values among an initial segment of that sequence. The size of\nthis initial segment increases with the size parameter. Essentially this\ngenerator is Gen.elements but taking also the size into account.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#oneof","title":"Gen.oneof","content":"Gen.oneof \noneof \n\nBuild a generator that generates a value from one of the generators in the given non-empty seq, with\nequal probability.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#frequency","title":"Gen.frequency","content":"Gen.frequency \nfrequency \n\n Build a generator that generates a value from one of the generators in the given non-empty seq, with\n given probabilities. The sum of the probabilities must be larger than zero.\n "},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#two","title":"Gen.two","content":"Gen.two \ntwo \n\nBuild a generator that generates a 2-tuple of the values generated by the given generator.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#three","title":"Gen.three","content":"Gen.three \nthree \n\nBuild a generator that generates a 3-tuple of the values generated by the given generator.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#four","title":"Gen.four","content":"Gen.four \nfour \n\nBuild a generator that generates a 4-tuple of the values generated by the given generator.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#zip","title":"Gen.zip","content":"Gen.zip \nzip \n\nCombine two generators into a generator of pairs.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#zip3","title":"Gen.zip3","content":"Gen.zip3 \nzip3 \n\nCombine three generators into a generator of 3-tuples.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#collectToList","title":"Gen.collectToList","content":"Gen.collectToList \ncollectToList \n\n Traverse the given enumerable into a generator of a list using the specified binder function to create generators.\n[category: Create generators from generators]\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#collectToArray","title":"Gen.collectToArray","content":"Gen.collectToArray \ncollectToArray \n\n Traverse the given array into a generator of an array using the specified binder function to create generators.\n[category: Creating generators from generators]\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#collectToSeq","title":"Gen.collectToSeq","content":"Gen.collectToSeq \ncollectToSeq \n\n Traverse the given enumerable into a generator of an enumerable using the specified binder function to create generators.\n Each seq generated by the resulting generator can be infinite, if the source seq is infinite.\n[category: Create generators from generators]\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#sequenceToList","title":"Gen.sequenceToList","content":"Gen.sequenceToList \nsequenceToList \n\n Sequence the given enumerable of generators into a generator of a list.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#sequenceToArray","title":"Gen.sequenceToArray","content":"Gen.sequenceToArray \nsequenceToArray \n\n Sequence the given array of generators into a generator of an array.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#sequenceToSeq","title":"Gen.sequenceToSeq","content":"Gen.sequenceToSeq \nsequenceToSeq \n\n Sequence the given seq of generators into a generator of a seq.\n Each seq generated by the resulting generator can be infinite, if the source seq is infinite.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#tryWhere","title":"Gen.tryWhere","content":"Gen.tryWhere \ntryWhere \n\nTries to generate a value that satisfies a predicate. This function \u0027gives up\u0027 by generating None\nif the given original generator did not generate any values that satisfied the predicate, after trying to\nget values by increasing its size.\n\nThe \u0060tryWhere\u0060 function is also aliased as \u0060tryFilter\u0060. These two functions are identical, but co-exist\nso that you can choose the word that makes your code most readable in your given context.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#tryFilter","title":"Gen.tryFilter","content":"Gen.tryFilter \ntryFilter \n\nTries to generate a value that satisfies a predicate. This function \u0027gives up\u0027 by generating None\nif the given original generator did not generate any values that satisfied the predicate, after trying to\nget values by increasing its size.\n\nThe \u0060tryFilter\u0060 function is an alias for the \u0060tryWhere\u0060 function. These two functions are identical, but co-exist\nso that you can choose the word that makes your code most readable in your given context.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#where","title":"Gen.where","content":"Gen.where \nwhere \n\nGenerates a value that satisfies a predicate. Contrary to tryWhere, this function keeps re-trying\nby increasing the size of the original generator ad infinitum. Make sure there is a high probability that \nthe predicate is satisfied.\n\nThe \u0060where\u0060 function is also aliased as \u0060filter\u0060. These two functions are identical, but co-exist\nso that you can choose the word that makes your code most readable in your given context.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#filter","title":"Gen.filter","content":"Gen.filter \nfilter \n\nGenerates a value that satisfies a predicate. Contrary to tryFilter, this function keeps re-trying\nby increasing the size of the original generator ad infinitum. Make sure there is a high probability that \nthe predicate is satisfied.\n\nThe \u0060filter\u0060 function is an alias for the \u0060where\u0060 function. These two functions are identical, but co-exist\nso that you can choose the word that makes your code most readable in your given context.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#shuffle","title":"Gen.shuffle","content":"Gen.shuffle \nshuffle \n\nGenerates random permutations of the given sequence.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#piles","title":"Gen.piles","content":"Gen.piles \npiles \n\n Generates random arrays of given length where the sum of\n all elements equals the given sum.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#listOfLength","title":"Gen.listOfLength","content":"Gen.listOfLength \nlistOfLength \n\n Generates lists of given length, containing values generated by the given generator.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#listOf","title":"Gen.listOf","content":"Gen.listOf \nlistOf \n\n Generates lists of random lengths between zero and size.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#nonEmptyListOf","title":"Gen.nonEmptyListOf","content":"Gen.nonEmptyListOf \nnonEmptyListOf \n\n Generates non-empty lists of random lengths between zero and size.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#arrayOfLength","title":"Gen.arrayOfLength","content":"Gen.arrayOfLength \narrayOfLength \n\n Generates arrays of given length, containing values generated by the given generator.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#arrayOf","title":"Gen.arrayOf","content":"Gen.arrayOf \narrayOf \n\n Generates arrays of random length between zero and size.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#array2DOfDim","title":"Gen.array2DOfDim","content":"Gen.array2DOfDim \narray2DOfDim \n\n Generates 2D arrays of the given dimensions.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#array2DOf","title":"Gen.array2DOf","content":"Gen.array2DOf \narray2DOf \n\n Generates a 2D array. The square root of the size is the maximum number of rows and columns.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#subListOf","title":"Gen.subListOf","content":"Gen.subListOf \nsubListOf \n\n Generates sublists of the given seq. For a given list of length n,\n each sublist has between 0 and n elements, and the order of the \n elements is the same as in the given seq.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#optionOf","title":"Gen.optionOf","content":"Gen.optionOf \noptionOf \n\nGenerates option values that are \u0027None\u0027 1/8 of the time.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder.html","title":"GenBuilder","content":"GenBuilder \n \nGenBuilder.GenBuilder \nGenBuilder \nGenBuilder.gen \ngen"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder.html#gen","title":"GenBuilder.gen","content":"GenBuilder.gen \ngen \n\n The computation expressions for generators: gen { ... }\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html","title":"GenBuilder","content":"GenBuilder \n\n The computation expression type for generators.\n \nGenBuilder.Bind \nBind \nGenBuilder.Bind2 \nBind2 \nGenBuilder.Bind2Return \nBind2Return \nGenBuilder.Bind3 \nBind3 \nGenBuilder.Bind3Return \nBind3Return \nGenBuilder.BindReturn \nBindReturn \nGenBuilder.Combine \nCombine \nGenBuilder.Delay \nDelay \nGenBuilder.For \nFor \nGenBuilder.MergeSources \nMergeSources \nGenBuilder.MergeSources3 \nMergeSources3 \nGenBuilder.Return \nReturn \nGenBuilder.ReturnFrom \nReturnFrom \nGenBuilder.TryFinally \nTryFinally \nGenBuilder.TryWith \nTryWith \nGenBuilder.Using \nUsing \nGenBuilder.While \nWhile \nGenBuilder.Zero \nZero"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#Bind","title":"GenBuilder.Bind","content":"GenBuilder.Bind \nBind \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#Bind2","title":"GenBuilder.Bind2","content":"GenBuilder.Bind2 \nBind2 \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#Bind2Return","title":"GenBuilder.Bind2Return","content":"GenBuilder.Bind2Return \nBind2Return \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#Bind3","title":"GenBuilder.Bind3","content":"GenBuilder.Bind3 \nBind3 \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#Bind3Return","title":"GenBuilder.Bind3Return","content":"GenBuilder.Bind3Return \nBind3Return \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#BindReturn","title":"GenBuilder.BindReturn","content":"GenBuilder.BindReturn \nBindReturn \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#Combine","title":"GenBuilder.Combine","content":"GenBuilder.Combine \nCombine \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#Delay","title":"GenBuilder.Delay","content":"GenBuilder.Delay \nDelay \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#For","title":"GenBuilder.For","content":"GenBuilder.For \nFor \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#MergeSources","title":"GenBuilder.MergeSources","content":"GenBuilder.MergeSources \nMergeSources \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#MergeSources3","title":"GenBuilder.MergeSources3","content":"GenBuilder.MergeSources3 \nMergeSources3 \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#Return","title":"GenBuilder.Return","content":"GenBuilder.Return \nReturn \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#ReturnFrom","title":"GenBuilder.ReturnFrom","content":"GenBuilder.ReturnFrom \nReturnFrom \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#TryFinally","title":"GenBuilder.TryFinally","content":"GenBuilder.TryFinally \nTryFinally \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#TryWith","title":"GenBuilder.TryWith","content":"GenBuilder.TryWith \nTryWith \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#Using","title":"GenBuilder.Using","content":"GenBuilder.Using \nUsing \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#While","title":"GenBuilder.While","content":"GenBuilder.While \nWhile \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#Zero","title":"GenBuilder.Zero","content":"GenBuilder.Zero \nZero \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genoperators.html","title":"GenOperators","content":"GenOperators \n \nGenOperators.( \u003C!\u003E ) \n( \u003C!\u003E ) \nGenOperators.( \u003C*\u003E ) \n( \u003C*\u003E ) \nGenOperators.( \u003E\u003E= ) \n( \u003E\u003E= )"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genoperators.html#( \u003C!\u003E )","title":"GenOperators.( \u003C!\u003E )","content":"GenOperators.( \u003C!\u003E ) \n( \u003C!\u003E ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genoperators.html#( \u003C*\u003E )","title":"GenOperators.( \u003C*\u003E )","content":"GenOperators.( \u003C*\u003E ) \n( \u003C*\u003E ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genoperators.html#( \u003E\u003E= )","title":"GenOperators.( \u003E\u003E= )","content":"GenOperators.( \u003E\u003E= ) \n( \u003E\u003E= ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-prop.html","title":"Prop","content":"Prop \n\nCombinators to build properties, which define the property to be tested, with some\nconvenience methods to investigate the generated arguments and any found counter-examples.\n \nProp.forAll \nforAll \nProp.given \ngiven \nProp.filter \nfilter \nProp.throws \nthrows \nProp.classify \nclassify \nProp.trivial \ntrivial \nProp.collect \ncollect \nProp.label \nlabel \nProp.ofTestable \nofTestable \nProp.discard \ndiscard"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-prop.html#forAll","title":"Prop.forAll","content":"Prop.forAll \nforAll \n\nQuantified property combinator. Provide a custom test data generator to a property.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-prop.html#given","title":"Prop.given","content":"Prop.given \ngiven \n\nDepending on the condition, return the first testable if true and the second if false.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-prop.html#filter","title":"Prop.filter","content":"Prop.filter \nfilter \n\nConditional property combinator. Resulting property holds if the given property holds whenever the condition does. See also operator: \u0027assertion ==\u003E property\u0027\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-prop.html#throws","title":"Prop.throws","content":"Prop.throws \nthrows \n\nExpect exception \u0027t when executing p. So, results in success if an exception of the given type is thrown, \nand a failure otherwise.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-prop.html#classify","title":"Prop.classify","content":"Prop.classify \nclassify \n\nClassify test cases. Test cases satisfying the condition are assigned the classification given.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-prop.html#trivial","title":"Prop.trivial","content":"Prop.trivial \ntrivial \n\nCount trivial cases. Test cases for which the condition is True are classified as trivial.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-prop.html#collect","title":"Prop.collect","content":"Prop.collect \ncollect \n\nCollect data values. The argument of collect is evaluated in each test case, \nand the distribution of values is reported, using sprintf \u0022%A\u0022.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-prop.html#label","title":"Prop.label","content":"Prop.label \nlabel \n\nAdd the given label to the property. The labels of a failing sub-property are displayed when it fails.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-prop.html#ofTestable","title":"Prop.ofTestable","content":"Prop.ofTestable \nofTestable \n\n Turns a testable type into a property. Testables are unit, boolean, Lazy testables, Gen testables, functions\n from a type for which a generator is know to a testable, tuples up to 6 tuple containing testables, and lists\n containing testables.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-prop.html#discard","title":"Prop.discard","content":"Prop.discard \ndiscard \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-propoperators.html","title":"PropOperators","content":"PropOperators \n\nOperators for Prop.\n \nPropOperators.( ==\u003E ) \n( ==\u003E ) \nPropOperators.( .\u0026. ) \n( .\u0026. ) \nPropOperators.( .|. ) \n( .|. )"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-propoperators.html#( ==\u003E )","title":"PropOperators.( ==\u003E )","content":"PropOperators.( ==\u003E ) \n( ==\u003E ) \n\nConditional property combinator. Resulting property holds if the property after ==\u003E holds whenever the condition does.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-propoperators.html#( .\u0026. )","title":"PropOperators.( .\u0026. )","content":"PropOperators.( .\u0026. ) \n( .\u0026. ) \n\nConstruct a property that succeeds if both succeed. (cfr \u0027and\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-propoperators.html#( .|. )","title":"PropOperators.( .|. )","content":"PropOperators.( .|. ) \n( .|. ) \n\nConstruct a property that fails if both fail. (cfr \u0027or\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arb.html","title":"Arb","content":"Arb \n \nArb.Array \nArray \nArb.Convert \nConvert \nArb.Filter \nFilter \nArb.From \nFrom \nArb.From \nFrom \nArb.MapFilter \nMapFilter \nArb.Nullable \nNullable \nArb.ToArbitrary \nToArbitrary \nArb.ToArbitrary \nToArbitrary \nArb.Zip \nZip"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arb.html#Array","title":"Arb.Array","content":"Arb.Array \nArray \n\n Generates one-dimensional arrays. \n The length of the generated array is between 0 and size.\n The sum of the sizes of the elements is equal to the size of the generated array.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arb.html#Convert","title":"Arb.Convert","content":"Arb.Convert \nConvert \n\nConstruct an Arbitrary instance for a type that can be mapped to and from another type (e.g. a wrapper),\nbased on a Arbitrary instance for the source type and two mapping functions. \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arb.html#Filter","title":"Arb.Filter","content":"Arb.Filter \nFilter \n\n Return an Arbitrary instance that is a filtered version of an existing arbitrary instance.\n The generator uses Gen.where, and the shrinks are filtered using Seq.filter with the given predicate.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arb.html#From","title":"Arb.From","content":"Arb.From \nFrom \n\n Construct an Arbitrary instance from a generator and shrinker.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arb.html#From","title":"Arb.From","content":"Arb.From \nFrom \n\n Construct an Arbitrary instance from a generator.\n Shrink is not supported for this type.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arb.html#MapFilter","title":"Arb.MapFilter","content":"Arb.MapFilter \nMapFilter \n\n Return an Arbitrary instance that is a mapped and filtered version of an existing arbitrary instance.\n The generator uses Gen.map with the given mapper and then Gen.where with the given predicate, \n and the shrinks are filtered using Seq.filter with the given predicate.\nThis is sometimes useful if using just a filter would reduce the chance of getting a good value\nfrom the generator - and you can map the value instead. E.g. PositiveInt.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arb.html#Nullable","title":"Arb.Nullable","content":"Arb.Nullable \nNullable \n\n Generates nullable values that are null 1/8 of the time.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arb.html#ToArbitrary","title":"Arb.ToArbitrary","content":"Arb.ToArbitrary \nToArbitrary \n\n Construct an Arbitrary instance from a generator and shrinker.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arb.html#ToArbitrary","title":"Arb.ToArbitrary","content":"Arb.ToArbitrary \nToArbitrary \n\n Construct an Arbitrary instance from a generator.\n Shrink is not supported for this type.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arb.html#Zip","title":"Arb.Zip","content":"Arb.Zip \nZip \n\n Generates 2-tuples.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arbmap.html","title":"ArbMap","content":"ArbMap \n \nArbMap.GeneratorFor \nGeneratorFor \nArbMap.Merge \nMerge \nArbMap.Merge \nMerge \nArbMap.MergeArb \nMergeArb \nArbMap.MergeArbFactory \nMergeArbFactory \nArbMap.MergeArbFactory \nMergeArbFactory \nArbMap.MergeArbFactory \nMergeArbFactory \nArbMap.Default \nDefault"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arbmap.html#GeneratorFor","title":"ArbMap.GeneratorFor","content":"ArbMap.GeneratorFor \nGeneratorFor \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arbmap.html#Merge","title":"ArbMap.Merge","content":"ArbMap.Merge \nMerge \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arbmap.html#Merge","title":"ArbMap.Merge","content":"ArbMap.Merge \nMerge \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arbmap.html#MergeArb","title":"ArbMap.MergeArb","content":"ArbMap.MergeArb \nMergeArb \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arbmap.html#MergeArbFactory","title":"ArbMap.MergeArbFactory","content":"ArbMap.MergeArbFactory \nMergeArbFactory \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arbmap.html#MergeArbFactory","title":"ArbMap.MergeArbFactory","content":"ArbMap.MergeArbFactory \nMergeArbFactory \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arbmap.html#MergeArbFactory","title":"ArbMap.MergeArbFactory","content":"ArbMap.MergeArbFactory \nMergeArbFactory \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arbmap.html#Default","title":"ArbMap.Default","content":"ArbMap.Default \nDefault \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html","title":"Gen","content":"Gen \n \nGen.Array2DOf \nArray2DOf \nGen.Array2DOf \nArray2DOf \nGen.ArrayOf \nArrayOf \nGen.ArrayOf \nArrayOf \nGen.Cast \nCast \nGen.Choose \nChoose \nGen.CollectToArray \nCollectToArray \nGen.CollectToArray \nCollectToArray \nGen.CollectToList \nCollectToList \nGen.CollectToList \nCollectToList \nGen.CollectToSequence \nCollectToSequence \nGen.CollectToSequence \nCollectToSequence \nGen.Constant \nConstant \nGen.Elements \nElements \nGen.Elements \nElements \nGen.Four \nFour \nGen.Frequency \nFrequency \nGen.Frequency \nFrequency \nGen.Fresh \nFresh \nGen.GrowingElements \nGrowingElements \nGen.GrowingElements \nGrowingElements \nGen.ListOf \nListOf \nGen.ListOf \nListOf \nGen.NonEmptyListOf \nNonEmptyListOf \nGen.OneOf \nOneOf \nGen.OneOf \nOneOf \nGen.Or \nOr \nGen.OrNull \nOrNull \nGen.Piles \nPiles \nGen.Resize \nResize \nGen.Sample \nSample \nGen.Sample \nSample \nGen.Sample \nSample \nGen.ScaleSize \nScaleSize \nGen.Select \nSelect \nGen.SelectMany \nSelectMany \nGen.SelectMany \nSelectMany \nGen.Shuffle \nShuffle \nGen.Shuffle \nShuffle \nGen.Sized \nSized \nGen.SubListOf \nSubListOf \nGen.SubListOf \nSubListOf \nGen.Three \nThree \nGen.Two \nTwo \nGen.Where \nWhere \nGen.Zip \nZip \nGen.Zip \nZip"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Array2DOf","title":"Gen.Array2DOf","content":"Gen.Array2DOf \nArray2DOf \n\n Generates a 2D array. The square root of the size is the maximum number of rows and columns.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Array2DOf","title":"Gen.Array2DOf","content":"Gen.Array2DOf \nArray2DOf \n\n Generates a 2D array of the given dimensions.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#ArrayOf","title":"Gen.ArrayOf","content":"Gen.ArrayOf \nArrayOf \n\n Generates an array using the specified generator. \n The maximum length is size\u002B1.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#ArrayOf","title":"Gen.ArrayOf","content":"Gen.ArrayOf \nArrayOf \n\n Generates an array of a specified length.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Cast","title":"Gen.Cast","content":"Gen.Cast \nCast \n\n No-op, added to allow type annotations in LINQ expressions, e.g. from T x in e\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Choose","title":"Gen.Choose","content":"Gen.Choose \nChoose \n\n Generates integers between l and h, inclusive.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#CollectToArray","title":"Gen.CollectToArray","content":"Gen.CollectToArray \nCollectToArray \n\n Transform the given sequence into a generator of an array using the given function \n to create a generator for each element of the sequence.\n[category: Create generators from generators]\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#CollectToArray","title":"Gen.CollectToArray","content":"Gen.CollectToArray \nCollectToArray \n\n Transform the given sequence of generators into a generator of an array.\n[category: Create generators from generators]\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#CollectToList","title":"Gen.CollectToList","content":"Gen.CollectToList \nCollectToList \n\n Transform the given sequence into a generator of a List using the given function \n to create a generator for each element of the sequence.\n[category: Create generators from generators]\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#CollectToList","title":"Gen.CollectToList","content":"Gen.CollectToList \nCollectToList \n\n Transform the given sequence of generators into a generator of a List.\n[category: Create generators from generators]\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#CollectToSequence","title":"Gen.CollectToSequence","content":"Gen.CollectToSequence \nCollectToSequence \n\n Transform the given sequence into a generator of sequences using the given function \n to create a generator for each element of the sequence.\n Each sequence generated by the resulting generator can be infinite, if the source sequence is infinite.\n[category: Create generators from generators]\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#CollectToSequence","title":"Gen.CollectToSequence","content":"Gen.CollectToSequence \nCollectToSequence \n\n Transform the given sequence of generators into a generator of an array.\n Each sequence generated by the resulting generator can be infinite, if the source sequence is infinite.\n[category: Create generators from generators]\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Constant","title":"Gen.Constant","content":"Gen.Constant \nConstant \n\n Always generate the same given value. See also Fresh.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Elements","title":"Gen.Elements","content":"Gen.Elements \nElements \n\nBuild a generator that randomly generates one of the values in the given non-empty array.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Elements","title":"Gen.Elements","content":"Gen.Elements \nElements \n\nBuild a generator that randomly generates one of the values in the given non-empty, finite sequence.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Four","title":"Gen.Four","content":"Gen.Four \nFour \n\n Build a generator that generates a 4-tuple of the values generated by the given generator.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Frequency","title":"Gen.Frequency","content":"Gen.Frequency \nFrequency \n\n Build a generator that generates a value from one of the generators in the given non-empty arrat, with\n given probabilities. The sum of the probabilities must be larger than zero.\n "},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Frequency","title":"Gen.Frequency","content":"Gen.Frequency \nFrequency \n\n Build a generator that generates a value from one of the generators in the given non-empty seq, with\n given probabilities. The sum of the probabilities must be larger than zero.\n "},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Fresh","title":"Gen.Fresh","content":"Gen.Fresh \nFresh \n\n Generate fresh instances by calling create every time the generator \n generates a new value. Useful for generating new instances of mutable\n objects.\n See also constant.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#GrowingElements","title":"Gen.GrowingElements","content":"Gen.GrowingElements \nGrowingElements \n\n Build a generator that takes a non-empty array and randomly generates\n one of the values among an initial segment of that array. The size of\n this initial segment increases with the size parameter. Essentially this\n generator is Gen.Elements but taking also the size into account.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#GrowingElements","title":"Gen.GrowingElements","content":"Gen.GrowingElements \nGrowingElements \n\n Build a generator that takes a non-empty sequence and randomly generates\n one of the values among an initial segment of that sequence. The size of\n this initial segment increases with the size parameter. Essentially this\n generator is Gen.Elements but taking also the size into account.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#ListOf","title":"Gen.ListOf","content":"Gen.ListOf \nListOf \n\n Generates a list of random length. The maximum length depends on the\n size parameter.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#ListOf","title":"Gen.ListOf","content":"Gen.ListOf \nListOf \n\nGenerates a list of given length, containing values generated by the given generator.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#NonEmptyListOf","title":"Gen.NonEmptyListOf","content":"Gen.NonEmptyListOf \nNonEmptyListOf \n\n Generates a non-empty list of random length. The maximum length \n depends on the size parameter.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#OneOf","title":"Gen.OneOf","content":"Gen.OneOf \nOneOf \n\n Build a generator that generates a value from one of the generators in the given non-empty array,\n with equal probability.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#OneOf","title":"Gen.OneOf","content":"Gen.OneOf \nOneOf \n\n Build a generator that generates a value from one of the generators in the given non-empty sequence,\n with equal probability.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Or","title":"Gen.Or","content":"Gen.Or \nOr \n\n Build a generator that generates a value from two generators with equal probability.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#OrNull","title":"Gen.OrNull","content":"Gen.OrNull \nOrNull \n\n Build a generator that generates a value or \u0060null\u0060 1/8th of the time.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Piles","title":"Gen.Piles","content":"Gen.Piles \nPiles \n\n Generates random arrays of given length where the sum of\n all elements equals the given sum.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Resize","title":"Gen.Resize","content":"Gen.Resize \nResize \n\n Override the current size.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Sample","title":"Gen.Sample","content":"Gen.Sample \nSample \n\n Generates numberOfSample values with the given seed and of the given size.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Sample","title":"Gen.Sample","content":"Gen.Sample \nSample \n\n Generates numberOfSample values with the given size.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Sample","title":"Gen.Sample","content":"Gen.Sample \nSample \n\n Generates numberOfSample values with a new seed and size 50.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#ScaleSize","title":"Gen.ScaleSize","content":"Gen.ScaleSize \nScaleSize \n\nModify a size using the given function before passing it to the given generator.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Select","title":"Gen.Select","content":"Gen.Select \nSelect \n\n Create a new generator by applying selector to each value in the given generator.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#SelectMany","title":"Gen.SelectMany","content":"Gen.SelectMany \nSelectMany \n\n Creates a new generator that generates values from the source generator, \n applies the selector to them to get a new generator, and generates values \n by applying the resultSelector to the source value and the value from the second\n generator.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#SelectMany","title":"Gen.SelectMany","content":"Gen.SelectMany \nSelectMany \n\n Creates a new generator that generates values from the source generator, \n applies the selector to them, and generates values from the resulting generator.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Shuffle","title":"Gen.Shuffle","content":"Gen.Shuffle \nShuffle \n\n Generates random permutations of the given array.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Shuffle","title":"Gen.Shuffle","content":"Gen.Shuffle \nShuffle \n\n Generates random permutations of the given sequence.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Sized","title":"Gen.Sized","content":"Gen.Sized \nSized \n\n Obtain the current size. Sized(g) calls g, passing it the current size as a parameter.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#SubListOf","title":"Gen.SubListOf","content":"Gen.SubListOf \nSubListOf \n\n Generates sublists of the given array. For a given list of length n,\n each sublist has between 0 and n elements, and the order of the \n elements is the same as in the given sequence.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#SubListOf","title":"Gen.SubListOf","content":"Gen.SubListOf \nSubListOf \n\n Generates sublists of the given sequence. For a given list of length n,\n each sublist has between 0 and n elements, and the order of the \n elements is the same as in the given sequence.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Three","title":"Gen.Three","content":"Gen.Three \nThree \n\n Build a generator that generates a 3-tuple of the values generated by the given generator.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Two","title":"Gen.Two","content":"Gen.Two \nTwo \n\n Build a generator that generates a 2-tuple of the values generated by the given generator.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Where","title":"Gen.Where","content":"Gen.Where \nWhere \n\n Generates only values from the source generator that satisfy the predicate. This function keeps re-trying\n by increasing the size of the original generator ad infinitum. Make sure there is a high chance that \n the predicate is satisfied.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Zip","title":"Gen.Zip","content":"Gen.Zip \nZip \n\nCombine two generators into a new generator of the result of the given result selector.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Zip","title":"Gen.Zip","content":"Gen.Zip \nZip \n\nCombine two generators into a generator of pairs.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html","title":"Prop","content":"Prop \n\nExtensions to construct Properties.\n \nProp.And \nAnd \nProp.And \nAnd \nProp.And \nAnd \nProp.And \nAnd \nProp.And \nAnd \nProp.And \nAnd \nProp.And \nAnd \nProp.And \nAnd \nProp.Classify \nClassify \nProp.Classify \nClassify \nProp.Classify \nClassify \nProp.Classify \nClassify \nProp.Collect \nCollect \nProp.Collect \nCollect \nProp.Collect \nCollect \nProp.Collect \nCollect \nProp.Discard \nDiscard \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.Implies \nImplies \nProp.Implies \nImplies \nProp.Implies \nImplies \nProp.Implies \nImplies \nProp.Label \nLabel \nProp.Label \nLabel \nProp.Label \nLabel \nProp.Label \nLabel \nProp.Or \nOr \nProp.Or \nOr \nProp.Or \nOr \nProp.Or \nOr \nProp.Or \nOr \nProp.Or \nOr \nProp.Or \nOr \nProp.Or \nOr \nProp.ToProperty \nToProperty \nProp.ToProperty \nToProperty \nProp.ToProperty \nToProperty \nProp.Trivial \nTrivial \nProp.Trivial \nTrivial \nProp.Trivial \nTrivial \nProp.Trivial \nTrivial \nProp.When \nWhen \nProp.When \nWhen \nProp.When \nWhen \nProp.When \nWhen \nProp.When \nWhen \nProp.When \nWhen"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#And","title":"Prop.And","content":"Prop.And \nAnd \n\nConstruct a property that succeeds if both succeed. (cfr \u0027and\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#And","title":"Prop.And","content":"Prop.And \nAnd \n\nConstruct a property that succeeds if both succeed. (cfr \u0027and\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#And","title":"Prop.And","content":"Prop.And \nAnd \n\nConstruct a property that succeeds if both succeed. (cfr \u0027and\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#And","title":"Prop.And","content":"Prop.And \nAnd \n\nConstruct a property that succeeds if both succeed. (cfr \u0027and\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#And","title":"Prop.And","content":"Prop.And \nAnd \n\nConstruct a property that succeeds if both succeed. (cfr \u0027and\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#And","title":"Prop.And","content":"Prop.And \nAnd \n\nConstruct a property that succeeds if both succeed. (cfr \u0027and\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#And","title":"Prop.And","content":"Prop.And \nAnd \n\nConstruct a property that succeeds if both succeed. (cfr \u0027and\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#And","title":"Prop.And","content":"Prop.And \nAnd \n\nConstruct a property that succeeds if both succeed. (cfr \u0027and\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Classify","title":"Prop.Classify","content":"Prop.Classify \nClassify \n\nClassify test cases. Test cases satisfying the condition are assigned the classification given.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Classify","title":"Prop.Classify","content":"Prop.Classify \nClassify \n\nClassify test cases. Test cases satisfying the condition are assigned the classification given.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Classify","title":"Prop.Classify","content":"Prop.Classify \nClassify \n\nClassify test cases. Test cases satisfying the condition are assigned the classification given.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Classify","title":"Prop.Classify","content":"Prop.Classify \nClassify \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Collect","title":"Prop.Collect","content":"Prop.Collect \nCollect \n\nCollect data values. The argument of collect is evaluated in each test case, \nand the distribution of values is reported.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Collect","title":"Prop.Collect","content":"Prop.Collect \nCollect \n\nCollect data values. The argument of collect is evaluated in each test case, \nand the distribution of values is reported.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Collect","title":"Prop.Collect","content":"Prop.Collect \nCollect \n\nCollect data values. The argument of collect is evaluated in each test case, \nand the distribution of values is reported.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Collect","title":"Prop.Collect","content":"Prop.Collect \nCollect \n\nCollect data values. The argument of collect is evaluated in each test case, \nand the distribution of values is reported.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Discard","title":"Prop.Discard","content":"Prop.Discard \nDiscard \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Implies","title":"Prop.Implies","content":"Prop.Implies \nImplies \n\nConditional property combinator. Resulting property holds if the property holds when the condition does.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Implies","title":"Prop.Implies","content":"Prop.Implies \nImplies \n\nConditional property combinator. Resulting property holds if the property holds when the condition does.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Implies","title":"Prop.Implies","content":"Prop.Implies \nImplies \n\nConditional property combinator. Resulting property holds if the property holds when the condition does.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Implies","title":"Prop.Implies","content":"Prop.Implies \nImplies \n\nConditional property combinator. Resulting property holds if the property holds when the condition does.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Label","title":"Prop.Label","content":"Prop.Label \nLabel \n\nAdd the given label to the property. The labels of a failing sub-property are displayed when it fails.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Label","title":"Prop.Label","content":"Prop.Label \nLabel \n\nAdd the given label to the property. The labels of a failing sub-property are displayed when it fails.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Label","title":"Prop.Label","content":"Prop.Label \nLabel \n\nAdd the given label to the property. The labels of a failing sub-property are displayed when it fails.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Label","title":"Prop.Label","content":"Prop.Label \nLabel \n\nAdd the given label to the property. The labels of a failing sub-property are displayed when it fails.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Or","title":"Prop.Or","content":"Prop.Or \nOr \n\nConstruct a property that fails if both fail. (cfr \u0027or\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Or","title":"Prop.Or","content":"Prop.Or \nOr \n\nConstruct a property that fails if both fail. (cfr \u0027or\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Or","title":"Prop.Or","content":"Prop.Or \nOr \n\nConstruct a property that fails if both fail. (cfr \u0027or\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Or","title":"Prop.Or","content":"Prop.Or \nOr \n\nConstruct a property that fails if both fail. (cfr \u0027or\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Or","title":"Prop.Or","content":"Prop.Or \nOr \n\nConstruct a property that fails if both fail. (cfr \u0027or\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Or","title":"Prop.Or","content":"Prop.Or \nOr \n\nConstruct a property that fails if both fail. (cfr \u0027or\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Or","title":"Prop.Or","content":"Prop.Or \nOr \n\nConstruct a property that fails if both fail. (cfr \u0027or\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Or","title":"Prop.Or","content":"Prop.Or \nOr \n\nConstruct a property that fails if both fail. (cfr \u0027or\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ToProperty","title":"Prop.ToProperty","content":"Prop.ToProperty \nToProperty \n\n Turns a testable type into a property.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ToProperty","title":"Prop.ToProperty","content":"Prop.ToProperty \nToProperty \n\n Turns a testable type into a property.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ToProperty","title":"Prop.ToProperty","content":"Prop.ToProperty \nToProperty \n\n Turns a testable type into a property.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Trivial","title":"Prop.Trivial","content":"Prop.Trivial \nTrivial \n\nCount trivial cases. Test cases for which the condition is True are classified as trivial.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Trivial","title":"Prop.Trivial","content":"Prop.Trivial \nTrivial \n\nCount trivial cases. Test cases for which the condition is True are classified as trivial.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Trivial","title":"Prop.Trivial","content":"Prop.Trivial \nTrivial \n\nCount trivial cases. Test cases for which the condition is True are classified as trivial.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Trivial","title":"Prop.Trivial","content":"Prop.Trivial \nTrivial \n\nCount trivial cases. Test cases for which the condition is True are classified as trivial.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#When","title":"Prop.When","content":"Prop.When \nWhen \n\nConditional property combinator. Resulting property holds if the given property holds whenever the condition does. See also operator: \u0027assertion ==\u003E property\u0027\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#When","title":"Prop.When","content":"Prop.When \nWhen \n\nConditional property combinator. Resulting property holds if the given property holds whenever the condition does. See also operator: \u0027assertion ==\u003E property\u0027\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#When","title":"Prop.When","content":"Prop.When \nWhen \n\nConditional property combinator. Resulting property holds if the property holds when the condition does.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#When","title":"Prop.When","content":"Prop.When \nWhen \n\nConditional property combinator. Resulting property holds if the property holds when the condition does.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#When","title":"Prop.When","content":"Prop.When \nWhen \n\nConditional property combinator. Resulting property holds if the property holds when the condition does.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#When","title":"Prop.When","content":"Prop.When \nWhen \n\nConditional property combinator. Resulting property holds if the property holds when the condition does.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric.html","title":"Numeric","content":"Numeric \n\n Adapted slightly from FSharpPlus, https://github.com/fsprojects/FSharpPlus/blob/master/LICENSE.md\n \nNumeric.MaxValue \nMaxValue \nNumeric.MinValue \nMinValue"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html","title":"MaxValue","content":"MaxValue \n \nMaxValue.Get \nGet \nMaxValue.MaxValue \nMaxValue \nMaxValue.MaxValue \nMaxValue \nMaxValue.MaxValue \nMaxValue \nMaxValue.MaxValue \nMaxValue \nMaxValue.MaxValue \nMaxValue \nMaxValue.MaxValue \nMaxValue \nMaxValue.MaxValue \nMaxValue \nMaxValue.MaxValue \nMaxValue \nMaxValue.MaxValue \nMaxValue \nMaxValue.MaxValue \nMaxValue \nMaxValue.MaxValue \nMaxValue \nMaxValue.MaxValue \nMaxValue \nMaxValue.MaxValue \nMaxValue \nMaxValue.MaxValue \nMaxValue \nMaxValue.MaxValue \nMaxValue \nMaxValue.MaxValue \nMaxValue \nMaxValue.MaxValue \nMaxValue"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#Get","title":"MaxValue.Get","content":"MaxValue.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html","title":"MinValue","content":"MinValue \n \nMinValue.Get \nGet \nMinValue.MinValue \nMinValue \nMinValue.MinValue \nMinValue \nMinValue.MinValue \nMinValue \nMinValue.MinValue \nMinValue \nMinValue.MinValue \nMinValue \nMinValue.MinValue \nMinValue \nMinValue.MinValue \nMinValue \nMinValue.MinValue \nMinValue \nMinValue.MinValue \nMinValue \nMinValue.MinValue \nMinValue \nMinValue.MinValue \nMinValue \nMinValue.MinValue \nMinValue \nMinValue.MinValue \nMinValue \nMinValue.MinValue \nMinValue \nMinValue.MinValue \nMinValue \nMinValue.MinValue \nMinValue \nMinValue.MinValue \nMinValue"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#Get","title":"MinValue.Get","content":"MinValue.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-shrink-1.html","title":"Shrink\u003C\u0027T\u003E","content":"Shrink\u003C\u0027T\u003E \n\n Shrink\u003CT\u003E keeps a value and the possible shrinks for that value in an n-ary tree.\n This tree is explored by the test runner to find a smaller value of a counter-example.\n"},{"uri":"https://fscheck.github.io/FsCheck/index.html","title":"FsCheck: Random Testing for .NET\r\n","content":"(**\nFsCheck: Random Testing for .NET\n================================\n\nFsCheck is a tool for testing .NET programs automatically. The programmer provides a specification of the program, in the form of properties which functions, methods or objects should satisfy, and FsCheck then tests that the properties hold in a large number of randomly generated cases. While writing the properties, you are actually writing a testable specification of your program. Specifications are expressed in F#, C# or VB, using combinators defined in the FsCheck library. FsCheck provides combinators to define properties, observe the distribution of test data, and define test data generators. When a property fails, FsCheck automatically displays a minimal counter example.\n\nFsCheck, NUnit and xUnit.NET plugin can be \u003Ca href=\u0022https://www.nuget.org/packages?q=fscheck\u0022\u003Einstalled from NuGet\u003C/a\u003E using your favorite package manager.\n\nUsers have also created integrations with [Expecto](https://github.com/haf/Expecto), \n[Fuchu](https://github.com/mausch/Fuchu), \n[AutoFixture](https://github.com/AutoFixture/AutoFixture) and \n[MSTest](https://github.com/microsoft/testfx) that \nyou can [find on NuGet](https://www.nuget.org/packages?q=fscheck).\n\nWarning: Documentation\n----------------------\n\nThe Documentation section below was written for version 2.x, but 3.x is the version that is currently maintained. Only v3 will get new features and fixes, even though it\u0027s in pre-release.\n\nThis leaves us in the unfortunate position that some documentation is out of date and incomplete. One exception is the API docs. They are generated from the 3.x code and are accurate - if in doubt, believe the API docs.\n\nThe documentation and API docs for 2.x are not easily accessible anymore. The last commit of the 2.x documentation site is [here](https://github.com/fscheck/FsCheck/tree/1458b268b4311f7e4b25871715f1f9b5d58a21b3).\n\nPleae help fixing this! FsCheck welcoms contributions of all kinds, big or small. See [issues](https://github.com/fscheck/FsCheck/issues?q=is%3Aissue\u002Bis%3Aopen\u002Blabel%3A%22help\u002Bwanted%22) for inspiration. Feel free to open an issue to highlight specific documentation problems or gaps, even if you\u0027re not sure it really is a problem. At worst you\u0027ll get an answer to your question.\n\nDocumentation\n-------------\n\n * [QuickStart](QuickStart.html) to get started.\n\n * [Properties](Properties.html) describes FsCheck\u0027s language to express tests - \n in other frameworks these are often called parametrized tests or\n generative tests. FsCheck calls them properties.\n\n * [Generating test data](TestData.html) describes how to guide FsCheck to\n generate better data or to stop it from generating data that doesn\u0027t make\n sense for what you\u0027re trying to test. FsCheck has a flexible language to describe test \n value generators and shrinkers, and apply them to your properties.\n\n * [Running Tests](RunningTests.html) explains various ways to run FsCheck tests and how to\n integrate with unit testing frameworks.\n\n * [Model based testing](StatefulTestingNew.html), for testing stateful systems and objects. Since this is in the Experimental namespace, semantic versioning promises do not apply to this part of the API.\n\n * [Tips and tricks](TipsAndTricks.html) \n\n * [API Reference](reference/index.html) contains automatically generated documentation for all types, modules\n and functions.\n\n\n \nContributing and copyright\n--------------------------\n\nThe project is hosted on [GitHub][gh] where you can [report issues][issues], fork \nthe project and submit pull requests. If you\u0027re adding new public API, please also \nconsider adding [samples][content] that can be turned into documentation.\n\nThe library is available under the BSD license, which allows modification and \nredistribution for both commercial and non-commercial purposes. For more information see the \n[License file][license] in the GitHub repository. \n\n [content]: https://github.com/fscheck/FsCheck/tree/master/docs\n [gh]: https://github.com/fscheck/FsCheck\n [issues]: https://github.com/fscheck/FsCheck/issues\n [readme]: https://github.com/fscheck/FsCheck/blob/master/README.md\n [license]: https://github.com/fscheck/FsCheck/blob/master/License.txt\n*)"},{"uri":"https://fscheck.github.io/FsCheck/LearningResources.html","title":"Learning resources\r\n","content":"# Learning resources\r\n\r\n## Articles\r\n\r\n* A six-part series on understanding property-based testing through implementing a simplified PBT library: [1](https://getcode.substack.com/p/property-based-testing-1-what-is), [2](https://getcode.substack.com/p/-property-based-testing-2-the-essentials), [3](https://getcode.substack.com/p/property-based-testing-3-shrinking), [4](https://getcode.substack.com/p/property-based-testing-4-unifying), [5](https://getcode.substack.com/p/property-based-testing-5-shrinking), [6](https://getcode.substack.com/p/property-based-testing-6-random-all).\r\n* \u0022QuickCheck: A Lightweight Tool for Random Testing of Haskell Programs\u0022 by Koen Claessen and John Hughes [pdf](http://www.eecs.northwestern.edu/~robby/courses/395-495-2009-fall/quick.pdf)\r\n* \u0022An introduction to property-based testing\u0022 by Scott Wlaschin [link](http://fsharpforfunandprofit.com/posts/property-based-testing/)\r\n* \u0022Choosing properties for property-based testing\u0022 by Scott Wlaschin [link](http://fsharpforfunandprofit.com/posts/property-based-testing-2/)\r\n* An interesting read about QuickCheck is in [Chapter 11](http://book.realworldhaskell.org/read/testing-and-quality-assurance.html) of the excellent [Real world Haskell](http://book.realworldhaskell.org) book. The book is freely available online, but do the authors a favor and buy it, it\u0027s really worth it also for F# programmers.\r\n* [This section](http://opcoast.com/demos/fsharp/part3.html) of the [Learning F#: Case study with Branch and Bound](http://opcoast.com/demos/fsharp/index.html) article demonstrates uses of FsCheck to test functions that arise in development of a branch and bound algorithm.\r\n\r\n## Books\r\n\r\n* \u0022Property-Based Testing with PropEr, Erlang, and Elixir: Find Bugs Before Your Users Do\u0022 by Fred Hebert [link](https://pragprog.com/titles/fhproper/property-based-testing-with-proper-erlang-and-elixir).\r\n\r\n## Videos\r\n\r\n* \u0022The lazy programmer\u0027s guide to writing 1000\u0027s of tests: An introduction to property based testing\u0022 by Scott Wlaschin [video](https://www.youtube.com/watch?v=IYzDFHx6QPY)\r\n* \u0022Race Conditions, Distribution, Interactions - Testing the Hard Stuff and Staying Sane\u0022 by John Hughes [video](https://vimeo.com/68383317)\r\n* \u0022Property-Based Testing for Better Code\u0022 by Jessica Kerr [video](https://www.youtube.com/watch?v=shngiiBfD80)\r\n"},{"uri":"https://fscheck.github.io/FsCheck/Properties.html","title":"Properties\r\n","content":"(*** hide ***)\n#I \u0022../src/FsCheck/bin/Release/netstandard2.0\u0022\n#r \u0022FsCheck\u0022\n\nopen FsCheck\nopen FsCheck.FSharp\nopen System\n\n(**\n# Properties\n\nProperties are expressed as F# function definitions or C# lambdas or methods. \nProperties are universally quantified over their parameters, so *)\n\nlet revRevIsOrig (xs:list\u003Cint\u003E) = List.rev(List.rev xs) = xs\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/Properties.cs,key=revRevIsOrig]\n\nmeans that the equality holds for all lists xs.\n\nProperties must not have generic types - because there can be so many different\nkinds of constraints on generic types, some of which may not even be visible from the\ntype signature, we currently think allowing FsCheck to generate a generic type is not worth the added complexity. \nIt\u0027s very simple to fix any types anyway simply by adding some type annotations.\n\nFsCheck can check properties of various forms - these forms are called testable, \nand are indicated in the API by a generic type called \u0060\u0027Testable\u0060. A \u0060\u0027Testable\u0060 may \nbe a function of any number of parameters that returns bool or unit. In the latter case, \n a test passes if it does not throw. The entry point to create properties is the Prop module.\n\n Like all of FsCheck\u0027s API, there are C# counterparts for all of the F# methods described.\n \n## Conditional Properties\n\nProperties may take the form \u0060\u003Ccondition\u003E ==\u003E \u003Cproperty\u003E\u0060\n\nFor example,*)\n\n(***hide***)\nlet rec ordered xs = \n match xs with\n | [] -\u003E true\n | [x] -\u003E true\n | x::y::ys -\u003E (x \u003C= y) \u0026\u0026 ordered (y::ys)\nlet rec insert x xs = \n match xs with\n | [] -\u003E [x]\n | c::cs -\u003E if x \u003C= c then x::xs else c::(insert x cs)\n\n(***define-output:insertKeepsOrder***)\nlet insertKeepsOrder (x:int) xs = ordered xs ==\u003E ordered (insert x xs)\nCheck.Quick insertKeepsOrder\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/Properties.cs,key=insertKeepsOrder] *)\n\n(***include-output:insertKeepsOrder***)\n\n(**\nSuch a property holds if the property after \u0060==\u003E\u0060 holds whenever the condition does.\n\nTesting discards test cases which do not satisfy the condition. Test case generation \ncontinues until 100 cases which do satisfy the condition have been found, or until \nan overall limit on the number of test cases is reached (to avoid looping if the condition \nnever holds). In this case a message such as \u0022Arguments exhausted after 97 tests.\u0022\nindicates that 97 test cases satisfying the condition were found, and that the property held in those 97 cases.\n\nNotice that in this case the generated values had to be restricted to int. This is because the generated \nvalues need to be comparable, but this is not reflected in the types. Therefore, without the explicit \nrestriction, FsCheck could generate lists containing different types (subtypes of objects), and these are not mutually comparable.\n \n## Lazy Properties\n\nSince F# has eager evaluation by default, the above property does more work than necessary: \nit evaluates the property at the right of the condition no matter what the \noutcome of the condition on the left. While only a performance consideration in the above \nexample, this may limit the expressiveness of properties - consider:*)\n\n(***define-output: eager***)\nlet tooEager a = a \u003C\u003E 0 ==\u003E (1/a = 1/a)\nCheck.Quick tooEager\n\n(***include-output: eager***)\n\n(**\nNon-strict evaluation is needed here to make sure the propery is checked correctly:*)\n\n(***define-output: lazy***)\nlet moreLazy a = a \u003C\u003E 0 ==\u003E (lazy (1/a = 1/a))\nCheck.Quick moreLazy\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/Properties.cs,key=lazy] *)\n\n(***include-output: lazy***)\n\n(**\n## Quantified Properties\n\nProperties may take the form \u0060forAll \u003Carbitrary\u003E (fun \u003Cargs\u003E -\u003E \u003Cproperty\u003E)\u0060.\n\nFor example, *)\n\n(***define-output:insertWithArb***)\nlet orderedList = ArbMap.defaults |\u003E ArbMap.arbitrary\u003Clist\u003Cint\u003E\u003E |\u003E Arb.mapFilter List.sort ordered\nlet insertWithArb x = Prop.forAll orderedList (fun xs -\u003E ordered(insert x xs))\nCheck.Quick insertWithArb\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/Properties.cs,key=insertWithArb] *)\n\n(***include-output:insertWithArb***)\n\n(**\nThe first argument of forAll is an IArbitrary instance. Such an instance \nencapsulates a test data generator and a shrinker (more on that in [Test Data](TestData.html)).\nBy supplying a custom generator, instead of using the default generator \nfor that type, it is possible to control the distribution of test data. In \nthe example, by supplying a custom generator for ordered lists, rather than \nfiltering out test cases which are not ordered, we guarantee that 100 test \ncases can be generated without reaching the overall limit on test cases. \nCombinators for defining generators are described in [Test Data](TestData.html).\n \n## Expecting exceptions\n\nYou may want to test that a function or method throws an exception under certain circumstances. \nUse \u0060throws\u003C\u0027e :\u003E exn,\u0027a\u003E Lazy\u003C\u0027a\u003E\u0060 to achieve this. For example:*)\n\n(***define-output: expectDivideByZero***)\nlet expectDivideByZero() = Prop.throws\u003CDivideByZeroException,_\u003E (lazy (raise \u003C| DivideByZeroException()))\nCheck.Quick expectDivideByZero\n\n(***include-output: expectDivideByZero***)\n \n(**\nThis functionality is not available in the C# API.\n\n \n## Observing Test Case Distribution\n\nIt is important to be aware of the distribution of test cases: if test data is not well \ndistributed then conclusions drawn from the test results may be invalid. In particular, \nthe \u0060==\u003E\u0060 operator can skew the distribution of test data badly, since only test data which \nsatisfies the given condition is used.\n\nFsCheck provides several ways to observe the distribution of test data. Code for \nmaking observations is incorporated into the statement of properties, each time \nthe property is actually tested the observation is made, and the collected observations \nare then summarized when testing is complete.\n\n### Counting Trivial Cases\n\nA property may take the form \u0060trivial \u003Ccondition\u003E \u003Cproperty\u003E\u0060\n\nFor example,*)\n\n(***define-output:insertTrivial***)\nlet insertTrivial (x:int) xs = \n ordered xs ==\u003E (ordered (insert x xs))\n |\u003E Prop.trivial (List.length xs = 0)\nCheck.Quick insertTrivial\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/Properties.cs,key=insertTrivial]\n\nTest cases for which the condition is true are classified as trivial, and the proportion of \ntrivial test cases in the total is reported:*)\n\n(***include-output:insertTrivial***)\n\n(**\n### Classifying Test Cases\n\nA property may take the form \u0060classify \u003Ccondition\u003E \u003Cstring\u003E \u003Cproperty\u003E\u0060\n\nFor example,*)\n\n(***define-output:insertClassify***)\nlet insertClassify (x:int) xs = \n ordered xs ==\u003E (ordered (insert x xs))\n |\u003E Prop.classify (ordered (x::xs)) \u0022at-head\u0022\n |\u003E Prop.classify (ordered (xs @ [x])) \u0022at-tail\u0022\nCheck.Quick insertClassify\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/Properties.cs,key=insertClassify]\n\nTest cases satisfying the condition are assigned the classification given, and the distribution of \nclassifications is reported after testing:*)\n\n(***include-output:insertClassify***)\n\n(**\nNote that a test case may fall into more than one classification.\n\n### Collecting Data Values\n\nA property may take the form \u0060collect \u003Cexpression\u003E \u003Cproperty\u003E\u0060\n\nFor example,*)\n\n(***define-output: insertCollect***)\nlet insertCollect (x:int) xs = \n ordered xs ==\u003E (ordered (insert x xs))\n |\u003E Prop.collect (List.length xs)\nCheck.Quick insertCollect\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/Properties.cs,key=insertCollect]\n\nThe argument of collect is evaluated in each test case, and the distribution of \nvalues is reported. The type of this argument is printed using \u0060sprintf \u0022%A\u0022\u0060:*)\n\n(***include-output: insertCollect***)\n\n(** \n### Combining Observations\n\nThe observations described here may be combined in any way. All the observations \nof each test case are combined, and the distribution of these combinations is \nreported. For example:*)\n\n(***define-output:insertCombined***)\nlet insertCombined (x:int) xs = \n ordered xs ==\u003E (ordered (insert x xs))\n |\u003E Prop.classify (ordered (x::xs)) \u0022at-head\u0022\n |\u003E Prop.classify (ordered (xs @ [x])) \u0022at-tail\u0022\n |\u003E Prop.collect (List.length xs)\nCheck.Quick insertCombined\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/Properties.cs,key=insertCombined]*)\n\n(***include-output:insertCombined***)\n\n(**\n## And, Or and Labels\n\nProperties may take the form\n\n* \u0060\u003Cproperty\u003E .\u0026. \u003Cproperty\u003E\u0060 succeeds if both succeed, fails if one of the properties fails, and is rejected when both are rejected.\n* \u0060\u003Cproperty\u003E .|. \u003Cproperty\u003E\u0060succeeds if either property succeeds, fails if both properties fail, and is rejected when both are rejected.\n\nThe \u0060.\u0026.\u0060 combinator is most commonly used to write complex properties which share a generator. \nIn that case, it might be difficult upon failure to know excactly which sub-property has caused the failure. \nThat\u0027s why you can label sub-properties, and FsCheck shows the labels of the failed subproperties when \nit finds a counter-example using \u0060Prop.label\u0060.\n\nFor example,*)\n\n(***define-output:complex***)\nlet complex (m: int) (n: int) =\n let res = n \u002B m\n (res \u003E= m) |\u003E Prop.label \u0022result \u003E #1\u0022 .\u0026.\n (res \u003E= n) |\u003E Prop.label \u0022result \u003E #2\u0022 .\u0026. \n (res \u003C m \u002B n) |\u003E Prop.label \u0022result not sum\u0022\nCheck.Quick complex\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/Properties.cs,key=complexProperty]*)\n\n(***include-output:complex***)\n\n(**\nIt\u0027s perfectly fine to apply more than one label to a property; FsCheck displays all the applicable labels. \nThis is useful for displaying intermediate results, for example:*)\n\n(***define-output:multiply***)\nlet multiply (n: int, m: int) =\n let res = n*m\n sprintf \u0022evidence = %i\u0022 res @| (\n Prop.label \u0022div1\u0022 (m \u003C\u003E 0 ==\u003E lazy (res / m = n)) .\u0026. \n Prop.label \u0022div2\u0022 (n \u003C\u003E 0 ==\u003E lazy (res / n = m)) .\u0026. \n Prop.label \u0022lt1\u0022 (res \u003E m) .\u0026. \n Prop.label \u0022lt2\u0022 (res \u003E n))\nCheck.Quick multiply\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/Properties.cs,key=multipleLabels]*)\n\n(***include-output:multiply***)"},{"uri":"https://fscheck.github.io/FsCheck/QuickStart.html","title":"Quick Start\r\n","content":"(*** hide ***)\n#I @\u0022../src/FsCheck/bin/Release/netstandard2.0\u0022\n#r @\u0022../src/FsCheck.Xunit/bin/Release/netstandard2.0/FsCheck.Xunit.dll\u0022\n#r @\u0022../packages/xunit.abstractions/lib/netstandard1.0/xunit.abstractions.dll\u0022\n#r @\u0022../packages/xunit.extensibility.core/lib/netstandard1.1/xunit.core.dll\u0022\n#r @\u0022../packages/xunit.extensibility.execution/lib/netstandard1.1/xunit.execution.dotnet.dll\u0022\n#r \u0022FsCheck\u0022\n\n(**\n# Quick Start\n\nThe fastest way to understand how FsCheck works is by writing some *properties* - FsCheck\u0027s terminology for a parametrized\ntest, or a generative test - and run them using the built-in test runner. Later on, we\u0027ll describe how they can be integrated\nwith existing test frameworks like NUnit, xUnit.NET or MsTest.\n\nFirst install FsCheck, open an fsx file and start with:*)\n\n#r \u0022nuget:FsCheck\u0022\n\nopen FsCheck\n\n(** In C#: To easily experiment, start a new console app to execute the snippets below (the output is written to console\nby default). Alternatively, in LinqPad, reference FsCheck.dll and FSharp.Core.dll, open namespace FsCheck, change the language to \u0022C# statements\u0022\nand you should be able to execute most of the snippets as well. \n\n## A Simple Example\n\nA simple example of a property - a test with parameters - is written as a normal F# function that returns a bool: *)\n\nlet revRevIsOrig (xs:list\u003Cint\u003E) = List.rev(List.rev xs) = xs\n(** This property asserts that the reverse of the reverse of a list is the list itself. \nTo check the property, we load this definition in F# interactive and then invoke *)\n\n(*** define-output: revRevIsOrig ***)\nCheck.Quick revRevIsOrig\n\n(*** include-output: revRevIsOrig ***)\n\n(** In C#:\n\n [lang=csharp,file=../examples/CSharp.DocSnippets/QuickStart.cs,key=revRevIsOrig]\n\nWhen a property fails, FsCheck displays a counter-example. For example, if we define *)\n\n(*** define-output: revIsOrig ***)\nlet revIsOrig (xs:list\u003Cint\u003E) = List.rev xs = xs\nCheck.Quick revIsOrig\n\n(*** include-output: revIsOrig ***)\n\n(** In C#: \n\n [lang=csharp,file=../examples/CSharp.DocSnippets/QuickStart.cs,key=revIsOrig]\n\nFsCheck also *shrinks* the counter example: it tries to find the minimal counter example that \nstill fails the property. The counter example is indeed minimal: \nthe list must have at least two different elements for the test to fail. FsCheck displays how many times it \nfound a smaller (in some way) counter example and so proceeded to shrink further.\n\nTo learn more on how to write properties, see [Properties](Properties.html).\n\n## What do I do if a test loops or encounters an error?\n\nIn this case we know that the property does not hold, but Check.Quick does not display the counter-example. \nThere is another testing function provided for this situation. Repeat the test using \n\u003Cpre\u003ECheck.Verbose\u003C/pre\u003E or in C# \u003Cpre\u003EVerboseCheck()\u003C/pre\u003E\nwhich displays each test case before running the test: the last test case displayed is thus\nthe one in which the loop or error arises.\n\nTo learn more on how to run FsCheck tests see [Running Tests](RunningTests.html).\n\n## FsCheck teaches us a lesson\n\nThe property above (the reverse of the reverse of a list is the list itself) is not always correct. \nConsider a list of floats that contains \u0060NaN\u0060 (not a number). Since \u0060NaN \u003C\u003E NaN\u0060, the reverse of \nthe reverse of \u0060[NaN]\u0060 is not actually equal to \u0060[NaN]\u0060. FsCheck has a knack for finding this kind of specification problem. \nTo see this error, ask FsCheck to generate lists of floats:*)\n\n(***define-output:revFloat***)\nlet revRevIsOrigFloat (xs:list\u003Cfloat\u003E) = List.rev(List.rev xs) = xs\nCheck.Quick revRevIsOrigFloat\n\n(***include-output:revFloat***)\n\n(** That said, the example in C# using floats actually works!\n\n [lang=csharp,file=../examples/CSharp.DocSnippets/QuickStart.cs,key=revRevIsOrigFloat]\n\nThis is because SequenceEquals uses the default equality comparer under the hood, which uses \u0060Double\u0060\u0027s \u0060Equals\u0060 method, which\nhas a special provision for \u0060NaN\u0060, as you can see in the [reference source](http://referencesource.microsoft.com/#mscorlib/system/double.cs,152).\nIf we pass an \u0060EqualityComparer\u0060 that uses \u0060==\u0060 to \u0060SequenceEquals\u0060, the C# example also fails.\n\nAs this seemingly trivial example shows, FsCheck helps you discover interesting properties of your code - and so ultimately,\nmore bugs!\n\n## Using FsCheck with other testing frameworks\n\nOnce you have finished your initial exploration of FsCheck, you\u0027ll probably want to use it with your existing\nunit test framework to augment unit tests or just to run the properties more easily. Below, we\u0027ll show some\nintegration, but we leave it up to you to choose whichever suits your environment best.\n\n### Integration with Expecto\n\nSome testing frameworks like Expecto have an out-of-the-box integration with FsCheck. By using one of the runners that\nsupport FsCheck out of the box, you gain access the the frameworks\u0027 reporting capabilities and integrations with IDEs\nand build tooling.\n\nHere\u0027s a sample:\n\n\u0060\u0060\u0060fsharp\nopen Expecto\nopen Expecto.ExpectoFsCheck\n\nlet config = { FsCheck.Config.Default with MaxTest = 10000 }\n\nlet properties =\n testList \u0022FsCheck samples\u0022 [\n testProperty \u0022Addition is commutative\u0022 \u003C| fun a b -\u003E\n a \u002B b = b \u002B a\n \n testProperty \u0022Reverse of reverse of a list is the original list\u0022 \u003C|\n fun (xs:list\u003Cint\u003E) -\u003E List.rev (List.rev xs) = xs\n\n // you can also override the FsCheck config\n testPropertyWithConfig config \u0022Product is distributive over addition\u0022 \u003C|\n fun a b c -\u003E\n a * (b \u002B c) = a * b \u002B a * c\n ]\n\nTests.runTests defaultConfig properties\n\u0060\u0060\u0060\n\n### Integration with xUnit\n\nAnother frequently used runner is xUnit.NET. Here is how to write \nthe unit test above so it can be run from xUnit.NET:*)\n\nopen global.Xunit\n\n[\u003CFact\u003E]\nlet \u0060\u0060Reverse of reverse of a list is the original list\u0060\u0060() =\n let revRevIsOrig (xs:list\u003Cint\u003E) = List.rev(List.rev xs) = xs\n Check.QuickThrowOnFailure revRevIsOrig\n \n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/QuickStart.cs,key=revRevIsOrigFact]\n\nFor xUnit, the test looks like any normal test, and the QuickThrowOnFailure ensures that if the test fails,\nan exception with the necessary information is raised so xUnit knows the test failed. The output of the test is the same\nas above.\n\n### Using FsCheck with xUnit.NET using the plugin\n\nxUnit.NET is \u0022blessed\u0022 with an FsCheck plugin. To use it, install the FsCheck.Xunit NuGet package. The test above can now\nbe written more tersely as follows:*)\n\nopen FsCheck.Xunit\n\n[\u003CProperty\u003E]\nlet \u0060\u0060Reverse of reverse of a list is the original list \u0060\u0060(xs:list\u003Cint\u003E) =\n List.rev(List.rev xs) = xs\n \n(** xUnit now shows the test similarly to a regular test, and is able to run it directly.\n\nTo learn more on how to use this integration or integration with other frameworks like NUnit,\nsee [Running Tests](RunningTests.html). *)"},{"uri":"https://fscheck.github.io/FsCheck/RunningTests.html","title":"Running tests\r\n","content":"open FsCheck.FSharp\n\n\n(*** hide ***)\n#I @\u0022../src/FsCheck/bin/Release/netstandard2.0\u0022\n#I @\u0022../src/FsCheck.Xunit/bin/Release/netstandard2.0\u0022\n#I @\u0022../src/FsCheck.NUnit/bin/Release/netstandard2.0\u0022\n#r @\u0022../packages/xunit.abstractions/lib/netstandard1.0/xunit.abstractions.dll\u0022\n#r @\u0022../packages/xunit.extensibility.core/lib/netstandard1.1/xunit.core.dll\u0022\n#r @\u0022../packages/xunit.extensibility.execution/lib/netstandard1.1/xunit.execution.dotnet.dll\u0022\n#r @\u0022../packages/NUnit/lib/netstandard2.0/nunit.framework.dll\u0022\n#r \u0022FsCheck\u0022\n#r \u0022FsCheck.Xunit\u0022\n#r \u0022FsCheck.NUnit\u0022\n\nopen FsCheck\nopen System\n\n(**\n# Running tests\n\nThis section describes the various ways in which you can run FsCheck tests:\n\n* FsCheck has a built-in test runner that is easy to invoke from F#/C# Interactive, commandline program or any test framework. \nIt writes the result of tests to standard output, and you can configure the FsCheck runner to throw an exception on test failure\nto signal the failure to whichever test runner you use.\n\n* FsCheck.Xunit integrates FsCheck with xUnit.NET to allow you to specify properties in a terse way. Tests written\nthis way look like native xUnit.NET tests, except they can take arguments.\n\n* FsCheck.NUnit integrates FsCheck with NUnit to allow you to specify properties in a terse way. Tests written\nthis way look like native NUnit tests, except they can take arguments.\n\n* FsCheck allows you to register an IRunner implementation that it calls on each outcome and each individual test it runs. This allows\na tighter integration with a specific test framework, and offers more control over printing of results.\n\n## Using the built-in test runner\n\n### Running a single property from an fsx/csx file or a command line runner\n\nFrom F# the preferred way of running a property is to use the methods on \u0060Check\u0060; for C# the preferred way is to use the extension\nmethods on the \u0060Property\u0060 type.\n\n\u0060Check.One\u0060 or \u0060\u003Cproperty.Check\u003E\u0060 runs the tests for a single property. It takes as argument an instance of the \u0060Config\u0060 type\nor \u0060Configuration\u0060 type respectively, which allows you to configure many aspects of how the FsCheck test runner works, \namong others the size of the test data and the random seed used (so you can reproduce a run). The \u0060Config\u0060 type is an F# \nrecord type so is the preferred way to use from F#; for other languages \u0060Configuration\u0060 is a mutable\nversion of it so is easier to use.\n\nMost of the methods on \u0060Check\u0060 and the extension methods like \u0060QuickCheck()\u0060 are a short-hand for running a test with a particular configuration. For example, \u0060Check.Quick\u0060 \nis equivalent to \u0060Check.One(Config.Quick, \u003Cproperty\u003E)\u0060; respectively \u0060\u003Cproperty\u003E.QuickCheck()\u0060 is a shorthand for \u0060\u003Cproperty\u003E.Check(Configuration.Quick)\u0060.\n\nTake note of \u0060Config(uration).Verbose\u0060 and \u0060Check.Verbose\u0060/\u0060VerboseCheck\u0060. These will print the arguments for each test, and are useful for example if\nyour test loops infinitely on some inputs.\n\nAlso take note of \u0060Check.QuickThrowOnFailure\u0060/\u0060QuickCheckThrowOnFailure()\u0060 and \u0060Check.VerboseThrowOnFailure\u0060/\u0060VerboseThrowOnFailure()\u0060. \nThese are intended to be used from unit tests executed through an existing test runner. They\u0027ll call the FsCheck runner \nand configure it such that is throws on failure; in all frameworks we are aware of this signals that the test has failed \nand so is an easy way to integrate FsCheck tests with unit tests you may already have.\n\nHere is an example of how to run a test with a similar configuration to Quick, but that runs 1000 tests and does not print to\nthe output on success:*)\n\nCheck.One(Config.Quick.WithMaxTest(1000).WithQuietOnSuccess(true), fun _ -\u003E true)\n\n(**\n [lang=csharp, file=../examples/CSharp.DocSnippets/RunningTests.cs,key=configuration]\n\n### Running many properties at once with Check.All\n\nUsually, you\u0027ll write more than one property to test. FsCheck allows you to group together properties as static members of a class: *)\ntype ListProperties =\n static member \u0060\u0060reverse of reverse is original\u0060\u0060 (xs:list\u003Cint\u003E) = List.rev(List.rev xs) = xs\n static member \u0060\u0060reverse is original\u0060\u0060 (xs:list\u003Cint\u003E) = List.rev xs = xs\n(**These can be checked at once using:*)\n\n(***define-output:ListProperties***)\nCheck.QuickAll\u003CListProperties\u003E()\n\n(**FsCheck now also prints the name of each test:*)\n\n(***include-output:ListProperties***)\n\n(**Since all top level functions of a a module are also compiled as static member of a class with the name of the module, \nyou can also use Check.QuickAll to test all the top level functions in a certain module. \nHowever, the type of a module is not directly accessible via F#, so you can use the following trick:*)\n\n(***define-output:ListProperties2***)\nCheck.QuickAll typeof\u003CListProperties\u003E.DeclaringType\n\n(**\nNotice also the counterpart of \u0060Check.Verbose\u0060: \u0060Check.VerboseAll\u0060.\n\n### Running tests using only modules\n\nArbitrary instances are given as static members of classes, and properties can be grouped together \nas static members of classes. Top level let functions are compiled as static member of their \nenclosing module (which is compiled as a class), and so you can simply define your properties and generators as \ntop level let-bound functions, and then register all generators and and all properties at once using the following trick:*)\n\n(***define-output:Marker***)\nlet myprop (i:int) = i \u003E= 0\nlet mygen = ArbMap.defaults |\u003E ArbMap.arbitrary\u003Cint\u003E |\u003E Arb.mapFilter (fun i -\u003E Math.Abs i) (fun i -\u003E i \u003E= 0)\nlet helper = \u0022a string\u0022\nlet private helper\u0027 = true\n\ntype Marker = class end\nlet config = Config.QuickThrowOnFailure.WithArbitrary([typeof\u003CMarker\u003E.DeclaringType])\nCheck.All(config, typeof\u003CMarker\u003E.DeclaringType)\n\n(***include-output:Marker***)\n\n(**\nThe Marker type is just any type defined in the module, to be able to get to the module\u0027s Type. F# offers no way \nto get to a module\u0027s Type directly.\n\nFsCheck determines the intent of the function based on its return type:\n\n* Properties: public functions that return unit, bool, Property or function of any arguments to those types \nor Lazy value of any of those types. So \u0060myprop\u0060 is the only property that is run; \u0060helper\u0027\u0060 also returns bool but is private.\n* Arbitrary instances: return Arbitrary\u003C_\u003E\n\nAll other functions are respectfully ignored. If you have top level functions that return types that FsCheck will \ndo something with, but do not want them checked or registered, just make them private. FsCheck will ignore those functions.\n\n## Using FsCheck.Xunit\n\nTo use the integration install the FsCheck.Xunit nuget package. Then: *)\n\nopen FsCheck\nopen FsCheck.Xunit\n\n(**\nYou can now attribute tests with \u0060PropertyAttribute\u0060 (a subclass of xUnit.NET\u0027s \u0060FactAttribute\u0060). Unlike xUnit.NET\u0027s facts, these \nmethods can take arguments and should return a property. FsCheck will be used to generate and shrink the arguments based on the\ntype and the currently registered generators. \n\nAn FsCheck test fails from xUnit.NET\u0027s perspective if it finds a counter-example, or if the arguments are exhausted. It\npasses when FsCheck can execute 100 tests (or whatever the configured number of tests is) succesfully.\n\nThe \u0060PropertyAttribute\u0060 allows you to customize how FsCheck will run for that\nmethod, similar to how you would use the \u0060Config\u0060 type otherwise. For example:*)\n\n[\u003CProperty\u003E]\nlet \u0060\u0060abs(v) % k equals abs(v % k)\u0060\u0060 v (NonZeroInt k) = \n (abs v) % k = abs(v % k)\n\n(**\nLikely one of the most useful configuration options of \u0060PropertyAttribute\u0060 is the ability to register or override an \u0060Arbitrary\u0060\ninstance just for that test method. You can also use the \u0060PropertiesAttribute\u0060 (note the plural form) to set custom configuration\noptions per class, per module, or per assembly. For example:*)\n\ntype Positive =\n static member Double() =\n ArbMap.defaults\n |\u003E ArbMap.arbitrary\u003Cfloat\u003E\n |\u003E Arb.mapFilter abs (fun t -\u003E t \u003E 0.0)\n\ntype Negative =\n static member Double() =\n ArbMap.defaults\n |\u003E ArbMap.arbitrary\u003Cfloat\u003E\n |\u003E Arb.mapFilter (abs \u003E\u003E ((-) 0.0)) (fun t -\u003E t \u003C 0.0)\n\ntype Zero =\n static member Double() =\n 0.0\n |\u003E Gen.constant\n |\u003E Arb.fromGen\n\n[\u003Cassembly: Properties( Arbitrary = [| typeof\u003CZero\u003E |] )\u003E] do()\n\nmodule ModuleWithoutProperties =\n\n [\u003CProperty\u003E]\n let \u0060\u0060should use Arb instances from assembly\u0060\u0060(underTest:float) =\n underTest = 0.0\n\n [\u003CProperty( Arbitrary=[| typeof\u003CPositive\u003E |] )\u003E]\n let \u0060\u0060should use Arb instance on method\u0060\u0060(underTest:float) =\n underTest \u003E 0.0\n\n[\u003CProperties( Arbitrary=[| typeof\u003CNegative\u003E |] )\u003E]\nmodule ModuleWithProperties =\n\n [\u003CProperty\u003E]\n let \u0060\u0060should use Arb instances from enclosing module\u0060\u0060(underTest:float) =\n underTest \u003C 0.0\n\n [\u003CProperty( Arbitrary=[| typeof\u003CPositive\u003E |] )\u003E]\n let \u0060\u0060should use Arb instance on method\u0060\u0060(underTest:float) =\n underTest \u003E 0.0\n\n(**\nUsing \u0060PropertiesAttribute\u0060 and \u0060PropertyAttribute\u0060 you can set any configuration. For example in following module:\n\n* property 1 would use default config \u002B overriden MaxTest = 10 and EndSize = 10 from \u0060Properties\u0060 attribute\n* property 2 would use default config \u002B overriden EndSize = 10 from \u0060Properties\u0060 attribute and MaxTest = 500 from \u0060Property\u0060 attribute\n* property 3 would use default config \u002B overriden MaxTest = 10 and EndSize = 10 from \u0060Properties\u0060 attribute and Replay = \u0022123,456\u0022 from \u0060Property\u0060 attribute \n*)\n\n[\u003CProperties(MaxTest = 10, EndSize = 10)\u003E] \nmodule Properties =\n\n [\u003CProperty\u003E]\n let \u0060\u0060property 1\u0060\u0060 input =\n true\n\n [\u003CProperty(MaxTest = 500)\u003E]\n let \u0060\u0060property 2\u0060\u0060 input =\n true\n\n [\u003CProperty(Replay = \u0022123,456\u0022)\u003E]\n let \u0060\u0060property 3\u0060\u0060 input =\n true\n\n(**\n### Using FsCheck.Xunit with TestDriven.Net\n\n[TestDriven.Net](http://testdriven.net) is a Visual Studio add-in that enables you to easily run a variety of tests\nwhile working with code in the IDE. Out of the box, TestDriven.Net can run tests written with FsCheck.Xunit.\n\nHowever, the user experience may, by default, be slightly less than optimal. TestDriven.Net outputs the state of the\ntest run in an unobtrusive manner, but if test failures occur, it outputs the result of the failing tests to Visual\nStudio\u0027s Output window. If you have Visual Studio configured in such a way that the Output window only appears if there\nactually *is* any output, you may be used to interpret the appearance of the Output window as a test failure.\n\nSince the Output window also appears if anything is written to the console in general, this can produce false\npositives. If you\u0027re accustomed to interpret the appearance of the Output window as a sign of a test failure, it can be\na little jarring that FsCheck by default always reports a bit of output on success.\n\nIf, for that, or other reasons, you want to disable output on success, you can do so:\n*)\n\n[\u003CProperty(QuietOnSuccess = true)\u003E]\nlet \u0060\u0060abs(v) % k equals abs(v % k) \u0060\u0060 v (NonZeroInt k) = \n (abs v) % k = abs(v % k)\n\n(**\nSetting \u0060QuietOnSuccess = true\u0060 only suppresses the output in case of success; in the case of test failures, output\nappears as normal.\n\n### Capturing output when using \u0060FactAttribute\u0060\n\nxUnit 2 doesn\u0027t capture messages written to the console but instead provides \u0060ITestOutputHelper\u0060 to [capture output](https://xunit.github.io/docs/capturing-output.html).\n\u0060ITestOutputHelper\u0060 has a single method \u0060WriteLine\u0060 and xUnit will automatically pass it in as a constructor argument.\nFsCheck.Xunit provides overloads for \u0060Property.QuickCheck\u0060, \u0060Property.QuickCheckThrowOnFailure\u0060, \u0060Property.VerboseCheck\u0060 and \u0060Property.VerboseCheckThrowOnFailure\u0060\nthat you can pass an \u0060ITestOutputHelper\u0060 so that xUnit captures FsCheck messages:\n\n\u0060\u0060\u0060\nusing System;\nusing FsCheck;\nusing FsCheck.Xunit;\nusing Xunit;\nusing Xunit.Abstractions;\n\npublic class Test\n{\n private readonly ITestOutputHelper _TestOutputHelper;\n public Test(ITestOutputHelper testOutputHelper)\n {\n _TestOutputHelper = testOutputHelper;\n }\n\n [Fact]\n public void Test1()\n {\n Prop\n .ForAll(...)\n .VerboseCheckThrowOnFailure(_TestOutputHelper);\n }\n}\n\u0060\u0060\u0060\n*)\n\n(**\n## Using FsCheck.NUnit\n\nTo use the integration with NUnit 3 install the FsCheck.NUnit nuget package.\nMake sure your project(s) has target .NET \u00604.5\u0060 or greater.\nThen open FsCheck.NUnit.\n\nYou can now attribute tests with \u0060PropertyAttribute\u0060 (a subclass of NUnit\u0027s \u0060TestAttribute\u0060). Unlike NUnit tests, these \nmethods can take arguments and should return a property. FsCheck will be used to generate and shrink the arguments based on the\ntype and the currently registered generators. \n\nAn FsCheck test fails from NUnit\u0027s perspective if it finds a counter-example, or if the arguments are exhausted. It\npasses when FsCheck can execute 100 tests (or whatever the configured number of tests is) succesfully.\n\nThe \u0060PropertyAttribute\u0060 allows you to customize how FsCheck will run for that\nmethod, similar to how you would use the \u0060Config\u0060 type otherwise.\n*)\n\nopen FsCheck.NUnit\n\n[\u003CProperty\u003E]\nlet \u0060\u0060Reverse of reverse of a list is the original list \u0060\u0060(xs:list\u003Cint\u003E) =\n List.rev(List.rev xs) = xs\n\n(**\nNote: the NUnit integration doesn\u0027t have the ability, like FsCheck.Xunit, to override \u0060Arbitrary\u0060 instances on a per class\nor per module basis. Otherwise, it is very similar.\n\n## Implementing IRunner \n\n### Example 1: to integrate FsCheck with other unit testing frameworks\n\nThe \u0060Config\u0060 type that can be passed to the \u0060Check.One\u0060 or \u0060Check.All\u0060 methods takes an \u0060IRunner\u0060 as argument. This i\nnterface has the following methods:\n\n* \u0060OnStartFixture\u0060 is called when FsCheck is testing all the methods on a type, before starting any tests.\n* \u0060OnArguments\u0060 is called after every test, passing the implementation the test number, the arguments and the every function. \n* \u0060OnShrink\u0060 is called at every succesful shrink.\n* \u0060OnFinished\u0060 is called with the name of the test and the outcome of the overall test run. This is used in the example below \nto call Assert statements from a particular unit testing framework - allowing FsCheck to integrate easily. You can leverage \nanother unit testing framework\u0027s ability to setup and tear down tests, have a nice graphical runner etc.*)\n\nlet testRunner =\n { new IRunner with\n member __.OnStartFixture t = ()\n member __.OnArguments (ntest,args, every) = ()\n member __.OnShrink(args, everyShrink) = ()\n member __.OnFinished(name,testResult) = \n match testResult with \n | TestResult.Passed _ -\u003E () //let the test runner know that the test passed\n | _ -\u003E () // test failed, or other problem. Notify test runner. Runner.onFinishedToString name testResult\n }\n \nlet withxUnitConfig = Config.Default.WithRunner(testRunner)\n\n(**\n### Example 2: to customize printing of generated arguments\n\nBy default, FsCheck prints generated arguments using \u0060sprintf \u0022%A\u0022\u0060, or structured formatting. This usually does what you expect, \ni.e. for primitive types the value, for objects the ToString override and so on. If it does not (A motivating case is \ntesting with COM objects - overriding ToString is not an option and structured formatting does not do anything useful with it), \nyou can use the \u0060label\u0060 combinator to solve this on a per property basis, but a more structured solution can be achieved by \nimplementing \u0060IRunner\u0060. For example:*)\n \nlet formatterRunner formatter =\n { new IRunner with\n member x.OnStartFixture t =\n printf \u0022%s\u0022 (Runner.onStartFixtureToString t)\n member x.OnArguments (ntest,args, every) =\n printf \u0022%s\u0022 (every ntest (args |\u003E List.map formatter))\n member x.OnShrink(args, everyShrink) =\n printf \u0022%s\u0022 (everyShrink (args |\u003E List.map formatter))\n member x.OnFinished(name,testResult) = \n let testResult\u0027 = match testResult with \n | TestResult.Failed (testData,origArgs,shrunkArgs,outCome,seed, seed2, size) -\u003E \n TestResult.Failed (testData,origArgs |\u003E List.map formatter, shrunkArgs |\u003E List.map formatter,outCome,seed, seed2, size)\n | t -\u003E t\n printf \u0022%s\u0022 (Runner.onFinishedToString name testResult\u0027) \n }\n\n(**\n### Using FsCheck.NUnit with TestDriven.Net\n\n[TestDriven.Net](http://testdriven.net) is a Visual Studio add-in that enables you to easily run a variety of tests\nwhile working with code in the IDE. Out of the box, TestDriven.Net can run tests written with FsCheck.NUnit.\n\nHowever, the user experience may, by default, be slightly less than optimal. TestDriven.Net outputs the state of the\ntest run in an unobtrusive manner, but if test failures occur, it outputs the result of the failing tests to Visual\nStudio\u0027s Output window. If you have Visual Studio configured in such a way that the Output window only appears if there\nactually *is* any output, you may be used to interpret the appearance of the Output window as a test failure.\n\nSince the Output window also appears if anything is written to the console in general, this can produce false\npositives. If you\u0027re accustomed to interpret the appearance of the Output window as a sign of a test failure, it can be\na little jarring that FsCheck by default always reports a bit of output on success.\n\nIf, for that, or other reasons, you want to disable output on success, you can do so:\n*)\n\n[\u003CProperty(QuietOnSuccess = true)\u003E]\nlet revUnit (x:char) = \n List.rev [x] = [x]\n\n(**\nSetting \u0060QuietOnSuccess = true\u0060 only suppresses the output in case of success; in the case of test failures, output\nappears as normal.\n*)"},{"uri":"https://fscheck.github.io/FsCheck/StatefulTestingNew.html","title":"Model-based Testing (Experimental)\r\n","content":"(*** hide ***)\n#r @\u0022../src/FsCheck/bin/Release/netstandard2.0/FsCheck.dll\u0022\nopen FsCheck\nopen FsCheck.FSharp\nopen FsCheck.Experimental\nopen System\n\n(**\n# Model-based Testing (Experimental)\n\nThere is also a newer, experimental interface to do model-based testing.\n\n*Caveat: since this is in the FsCheck.Experimental namespace for now, the rules of semantic versioning do \nnot apply to this particular part of the API. In other words, minor version releases may break your code.*\n\nLet\u0027s look at the following simple class, which has an artificial bug:*)\n\ntype Counter(?initial:int) =\n let mutable n = defaultArg initial 0\n member __.Inc() = \n //silly bug\n if n \u003C= 3 then n \u003C- n \u002B 1 else n \u003C- n \u002B 2\n n\n member __.Dec() = if n \u003C= 0 then failwithf \u0022Precondition fail\u0022 else n \u003C- n - 1; n\n member __.Reset() = n \u003C- 0\n override __.ToString() = sprintf \u0022Counter = %i\u0022 n\n\n(**\nAs a model to test this class we can use an int value which is an abstraction of the object\u0027s internal state. The\nidea is that each operation on the class (in this case, Inc, Dec and Reset) affects both the model object and the actual object, and \nafter each such operation, the model and the actual instance should still be equivalent.\n\nWith this idea in mind, you can write a specification of the Counter class using an int model as follows:*)\n\nlet spec =\n let inc = \n { new Operation\u003CCounter,int\u003E() with\n member __.Run m = m \u002B 1\n member __.Check (c,m) = \n let res = c.Inc() \n m = res \n |\u003E Prop.label (sprintf \u0022Inc: model = %i, actual = %i\u0022 m res)\n override __.ToString() = \u0022inc\u0022}\n let dec = \n { new Operation\u003CCounter,int\u003E() with\n member __.Run m = m - 1\n override __.Pre m = \n m \u003E 0\n member __.Check (c,m) = \n let res = c.Dec()\n m = res \n |\u003E Prop.label (sprintf \u0022Dec: model = %i, actual = %i\u0022 m res)\n override __.ToString() = \u0022dec\u0022}\n let create initialValue = \n { new Setup\u003CCounter,int\u003E() with\n member __.Actual() = new Counter(initialValue)\n member __.Model() = initialValue }\n { new Machine\u003CCounter,int\u003E() with\n member __.Setup = Gen.choose (0,3) |\u003E Gen.map create |\u003E Arb.fromGen\n member __.Next _ = Gen.elements [ inc; dec ] }\n\n(**\nLet\u0027s break this down a bit. A specification is put together as an object that is a subtype of the abstract class \u0060Machine\u003C\u0027TypeUnderTest,\u0027ModelType\u003E\u0060. \nWhat you\u0027re actually defining is a state machine which can simultaneously apply operations, or state transitions, to the actual system\nunder test (in this case, a simple object) and a model of the system under test.\n\nThe methods you override on \u0060Machine\u0060 are \u0060Setup\u0060, \u0060Next\u0060, and optionally \u0060TearDown\u0060. \n\n\u0060Machine.Setup\u0060 is a property that returns an \u0060Arbitrary\u0060 instance that generates (and optionally shrinks) a \u0060Setup\u003C\u0027TypeUnderTest, \u0027ModelType\u003E\u0060 object. This in turn has two methods\nto override: \u0060Actual()\u0060 which should return a new, fresh instance of the system under test every time it is called, and \u0060Model()\u0060 which should return the corresponding\ninstance of the model object each time it is called. In the example, there is only one subclass of \u0060Setup\u003C\u0027Counter,int\u003E\u0060 (in more complex cases, there might be more). Our\n\u0060Setup\u0060 instance takes as argument the initial counter value, and returns a fresh \u0060Counter\u0060 as the SUT. The model is in this case simply the initial value.\n\n\u0060Machine.Next\u0060 is a method that takes a model and generates the possible operations that are possible from the state represented by the model. Each operation\nis represented by an \u0060Operation\u0060 subclass. \n\n\u0060Operation\u0060 has three methods to override: \u0060Run\u0060, \u0060Check\u0060 and optionally \u0060Pre\u0060. \u0060Pre\u0060 takes a model and returns true\nif and only if this operation can execute on a model in that state - in other words it checks if the precondition for the operation is satisfied. Note that\n\u0060Machine.Next\u0060 can also return a reduced set of operations based on the model, which is more efficient, but the preconditions are checked regardless for each \noperation \u0060Next\u0060 generates. \n\n\u0060Run\u0060 takes a model and returns the new model which is the result of applying this operation to the model. \u0060Check\u0060 then takes the new model (as returned from \u0060Run\u0060),\napplies the operation to the actual system under test, and checks whether the result of the SUT matches with the model. The return type of \u0060Check\u0060 is Property so\nyou can use the usual FsCheck \u0060Prop\u0060 methods to implement this method.\n\nIn the example above there are only two operations that we\u0027re checking: \u0060Inc\u0060 and \u0060Dec\u0060. The \u0060Run\u0060 methods respectively increase and decrease the model. \u0060Check\u0060\ncalls \u0060Inc()\u0060 or \u0060Dec()\u0060 on the \u0060Counter\u0060 instance, and checks that after that the model counter is equal to the real \u0060Counter\u0060. \u0060Dec\u0060 in addition has a (quite\nsilly, for demonstration purposes) precondition that the value should be strictly greater than 0 - if we run this machine our \u0060Counter\u0060 throws if we call \u0060Dec\u0060 \nso when we run this specification we can check that FsCheck does the right thing here (testing the test library, very meta...)\n\nWe also override ToString in each \u0060Operation\u0060 so that counter-examples can be printed.\n\nA specification can be checked as follows:*)\n\n(***define-output:spec***)\nCheck.Quick (StateMachine.toProperty spec)\n\n(***include-output:spec***)\n\n(**\nNotice that not only has FsCheck found our \u0027bug\u0027, it has also produced the minimal sequence of operations that leads to it.\n\nBut what has actually happened? Using the generators from the \u0060Machine\u0060 methods, FsCheck tries to generate a random sequence of operations, for example: \n\n\u0060\u0060\u0060\n{Setup = (0, Setup Counter);\n Operations =\n [(inc, 1); (dec, 0); (inc, 1); (inc, 2); (inc, 3); (inc, 4); (inc, 5);\n (dec, 4); (dec, 3)];\n TearDown = TearDown Counter;}\n\u0060\u0060\u0060\n\nYou can read this as a trace of the operations: the counter started off in state \u00600\u0060, then using operation \u0060inc\u0060 when to state \u00601\u0060, then using operation \u0060dec\u0060\nwent to state \u00600\u0060 and so on.\n\nThis sequence is first generated using the model only, i.e. no operations are actually applied to any \u0060Counter\u0060 objects. After generating a full trace, the operations\nare actually applied to the system under test, using the \u0060Operation.Check\u0060 methods of the various \u0060Operation\u0060 objects.\n\nIf a failing test is found, FsCheck will attempt to remove operations from the sequence of operations, as long as the test still fails. So in the example above,\nalthough the original sequence contains a few superfluous operations, FsCheck normally finds a shorter if not the shortest sequence that leads to the failure.\n\nFinal tip: make the model class immutable. This makes it easier to reason about the model and the operations on it, and it also makes it easier to write the \u0060Check\u0060 methods.\nIf the model is mutable, you MUST make sure that the result of \u0060Run\u0060 is a new instance of the model that you don\u0027t modify later on. FsCheck captures these results\nduring the test run and during shrinking, and relies on them not changing.\n*)"},{"uri":"https://fscheck.github.io/FsCheck/TestData.html","title":"Test data: generators, shrinkers and Arbitrary instances\r\n","content":"(*** hide ***)\n#I @\u0022../src/FsCheck/bin/Release/netstandard2.0\u0022\n#r @\u0022FsCheck\u0022\nopen FsCheck\nopen FsCheck.FSharp\nopen System\n\n(**\n# Test data: generators, shrinkers and Arbitrary instances\n\nTest data is produced by test data generators. FsCheck defines default \ngenerators for some often used types, but you can use your own, and \nwill need to define your own generators for any new types you introduce.\n\nGenerators have types of the form \u0060Gen\u003C\u0027a\u003E\u0060; this is a generator for values \nof type a. To build your own generators in F#, a computation expression \ncalled \u0060gen\u0060 is provided by FsCheck, and all the functions in the \u0060Gen\u0060 module are at your disposal. \nFor C#, there are some LINQ methods you can use (select, where) and a number of methods on the \u0060Gen\u0060 class.\nThe name for the methods in F# and C# are largely the same except for casing.\n\nShrinkers have types of the form \u0060\u0027a -\u003E seq\u003C\u0027a\u003E\u0060 aka \u0060Func\u003CT,IEnumerable\u003CT\u003E\u003E\u0060; given a value, a shrinker \nproduces a sequence of values that are (in some way) smaller than the given value. \nIf FsCheck finds a set of values that falsify a given property, it will try \nto make that value smaller than the original (random) value by getting the \nshrinks for the value and trying each one in turn to check that the property \nis still false. If it is, the smaller value becomes the new counter example \nand the shrinking process continues with that value.\n\nShrinkers have no special support from FsCheck - this is not needed, \nsince you have all you need in \u0060seq\u0060 computation expressions and the \u0060Seq\u0060 module, or in LINQ and IEnumerable.\n\nFinally, an \u0060Arbitrary\u003C\u0027a\u003E\u0060 instance packages a generator and shrinker together to be used in properties. \nFsCheck also allows you to register Arbitrary instances in a \u0060Type\u0060 to \u0060Arbitrary\u0060 dictionary. \nThis dictionary is used to find an arbitrary instance for properties that have arguments, \nbased on the argument\u0027s type.\n\nArbitrary instances have some helper functions in \u0060Arb\u0060.\n \n## Generators\n\nGenerators are built from the function \u0060choose\u0060, which makes a random choice of \na value from an interval, with a uniform distribution. For example, to make \na random choice between the elements of a list, use*)\n\nlet chooseFromList xs = \n gen { let! i = Gen.choose (0, List.length xs-1) \n return List.item i xs }\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/TestData.cs,key=chooseFrom]\n\n### Choosing between alternatives\n\nA generator may take the form \u0060Gen.oneof \u003Csequence of generators\u003E\u0060\nwhich chooses among the generators in the list with equal probability. For example, \nthis generates a random boolean which is true with probability one half:*)\n\nGen.oneof [ gen { return true }; gen { return false } ]\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/TestData.cs,key=chooseBool]\n\nWe can control the distribution of results using \u0060frequency\u0060\ninstead. \u0060frequency\u0060 chooses a generator from the list randomly, but weighs the probability of \nchoosing each alternative by the factor given. For example, this generates true two thirds of the time.*)\n\nGen.frequency [ (2, gen { return true }); (1, gen { return false })]\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/TestData.cs,key=chooseBool2]\n \n### The size of test data\n\nTest data generators have an implicit size parameter; FsCheck begins by \ngenerating small test cases, and gradually increases the size as testing \nprogresses. Different test data generators interpret the size parameter \nin different ways: some ignore it, while the list generator, for example, \ninterprets it as an upper bound on the length of generated lists. You are \nfree to use it as you wish to control your own test data generators.\n\nYou can obtain the value of the size parameter using \u0060sized\u0060. \u0060sized g\u0060 calls \u0060g\u0060, passing it \nthe current size as a parameter. For example, to generate natural\n numbers in the range 0 to size, use*)\n\nGen.sized \u003C| fun s -\u003E Gen.choose (0,s)\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/TestData.cs,key=sizedInt]\n\nThe purpose of size control is to ensure that test cases are large enough to reveal errors, \nwhile remaining small enough to test fast. Sometimes the default size control does not achieve \nthis. For example, towards the end of a test run arbitrary lists may have up to 50 elements, \nso arbitrary lists of lists may have up to 2500, which is too large for efficient testing. In \nsuch cases it can be useful to modify the size parameter explicitly. You can do so using \n\u0060resize\u0060.\n\n\u0060resize n g\u0060 invokes generator \u0060g\u0060 with size parameter \u0060n\u0060. The size parameter should never be \nnegative. For example, to generate a random matrix it might be appropriate to take the square \nroot of the original size:*)\n\nlet matrix gen = Gen.sized \u003C| fun s -\u003E Gen.resize (s|\u003Efloat|\u003Esqrt|\u003Eint) gen\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/TestData.cs,key=matrixGen]\n\n### Generating recursive data types\n\nGenerators for recursive data types are easy to express using \u0060oneof\u0060 or \u0060frequency\u0060 to choose \nbetween constructors, and F#\u0027s computation expressions or C# LINQ to form a generator for each case. \nThere are also \u0060map\u0060 functions for arity up to 6 to lift constructors and functions into the \u0060Gen\u0060 type. \nFor example, if the type of trees is defined by *)\n\ntype Tree = Leaf of int | Branch of Tree * Tree\n\n(**\nthen a generator for trees might be defined by*)\n\nlet rec unsafeTree() = \n Gen.oneof [ ArbMap.defaults |\u003E ArbMap.generate\u003Cint\u003E |\u003E Gen.map Leaf\n Gen.map2 (fun x y -\u003E Branch (x,y)) (unsafeTree()) (unsafeTree())]\n\n(**\nIn C#, we elide the type because it is quite a bit more verbose than in F# - assume the typical composite\nof having an abstract superclass Tree with two subclasses, one for Leaf and one for Branch. Basically this is\nthe code F# generates for the type definition above. Assuming that, \u0060unsafeTree\u0060 in C# looks like:\n\n [lang=csharp,file=../examples/CSharp.DocSnippets/TestData.cs,key=unsafeTree]\n\nHowever, a recursive generator like this may fail to terminate with a \nStackOverflowException, or produce very large results. To avoid this, \nrecursive generators should always use the size control mechanism:*)\n\nlet tree =\n let rec tree\u0027 s = \n match s with\n | 0 -\u003E ArbMap.defaults |\u003E ArbMap.generate\u003Cint\u003E |\u003E Gen.map Leaf\n | n when n\u003E0 -\u003E \n let subtree = tree\u0027 (n/2)\n Gen.oneof [ ArbMap.defaults |\u003E ArbMap.generate\u003Cint\u003E |\u003E Gen.map Leaf\n Gen.map2 (fun x y -\u003E Branch (x,y)) subtree subtree]\n | _ -\u003E invalidArg \u0022s\u0022 \u0022Only positive arguments are allowed\u0022\n Gen.sized tree\u0027\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/TestData.cs,key=safeTree]\n\nNote that\n\n- We guarantee termination by forcing the result to be a leaf when the size is zero. \n- We halve the size at each recursion, so that the size gives an upper bound on the number of nodes in the tree. We are free to interpret the size as we will. \n- The fact that we share the subtree generator between the two branches of a Branch does not mean that we generate the same tree in each case.\n\n \n### Useful Generator Combinators\n\nIf \u0060g\u0060 is a generator for type \u0060t\u0060, then \n\n- \u0060two g\u0060 generates a pair of t\u0027s, \n- \u0060three g\u0060 generates a triple of t\u0027s, \n- \u0060four g\u0060 generates a quadruple of t\u0027s, \n- If xs is a list, then \u0060elements xs\u0060 generates an arbitrary element of xs.\n- If xs is a list, then \u0060growingElements xs\u0060 generates an arbitrary element among an initial segment of xs. The size of this initial segment increases with the size parameter.\n- \u0060listOfLength n g\u0060 generates a list of exactly n t\u0027s. \n- \u0060listOf g\u0060 generates a list of t\u0027s whose length is determined by the size parameter\n- \u0060nonEmptyListOf g\u0060 generates a non-empty list of t\u0027s whose length is determined by the size parameter.\n- \u0060constant v\u0060 generates the value v.\n- \u0060where p g\u0060 or \u0060filter p g\u0060 generates t\u0027s that satisfy the predicate p. Make sure there is a high chance that the predicate is satisfied.\n- \u0060tryWhere p g\u0060 or \u0060tryFilter p g\u0060 generates Some t\u0027s that satisfy the predicate p, and None if none are found. (After \u0027trying hard\u0027)\n- If xs is a sequence, then \u0060shuffle xs\u0060 generates a random permutation of xs.\n\nAll the generator combinators are functions on the Gen module. In C#, the names are the same just capitalized differently.\n\n### Generator examples\n\nThe following examples use \u0060Gen.sample\u0060 in order to show example output. In\ngeneral, you shouldn\u0027t use \u0060Gen.sample\u0060 when writing properties, but it can be\nhelpful when developing or troubleshooting a useful custom generator.\n\nPlease be aware that due to the non-deterministic nature of FsCheck, the output\nof calling \u0060Gen.sample\u0060 will, in most cases, differ between calls.\n\nThe \u0060Gen.sampleWithSize\u0060 function takes two arguments, in addition to the generator\nfrom which it samples. The first argument is the [size](#The-size-of-test-data)\nof the generated data. Some generators (like \u0060Gen.constant\u0060 and \u0060Gen.elements\u0060)\ndon\u0027t use the \u0060size\u0060 argument. For these generators, any integer value will do.\n\nThe second argument is the number of sample values to generate. Most examples\nbelow use \u0060Gen.sample\u0060 to generate a small list of example values, for example\na list of ten generated values.\n\n#### Constant\n\nThe \u0060Gen.constant\u0060 function is perhaps the simplest, and easiest, generator to\nunderstand. Even though it\u0027s part of a system that generates random values,\nthis particular generator always returns the same value:*)\n\n(***define-output:ConstantExample***)\nGen.constant (1, \u0022Foo\u0022) |\u003E Gen.sampleWithSize 0 10\n\n(**In this example, the constant is a complex value (a tuple); it can also be a\nsimple value, as for example a string or an integer. Since \u0060Gen.constant\u0060\ndoesn\u0027t rely on the \u0060size\u0060 argument, it\u0027s \u00600\u0060 in this example, but any value\nwould do; it wouldn\u0027t change the result. As you can see from the return value,\nall singular elements returned is the same tuple.*)\n\n(***include-it:ConstantExample***)\n\n(**Since the purpose of FsCheck is to generate random values, you shouldn\u0027t\nneed to use \u0060Gen.constant\u0060 often. Still, it can come in handy if you need to\nkeep the value of a particular type constant while you vary other values.\n\n#### Choose\n\nYou can use the \u0060Gen.choose\u0060 function to create a generator of singular integer\nvalues between a minimum and maximum value, both inclusive:*)\n\n(***define-output:ChooseBetweenZeroAndNineExample***)\nGen.choose (0, 9) |\u003E Gen.sampleWithSize 0 10\n\n(**This example generates a single integer value between 0 and 9. Since\n\u0060Gen.choose\u0060 doesn\u0027t rely on the \u0060size\u0060 argument, it\u0027s \u00600\u0060 in this example,\nbut any value would do; it wouldn\u0027t change the result.\n\nWhile \u0060Gen.choose (0, 9)\u0060 generates a single integer value, \u0060Gen.sample 0 10\u0060\ngenerates 10 sample values:*)\n\n(***include-it:ChooseBetweenZeroAndNineExample***)\n\n(**If you supply values in the \u0027wrong order\u0027, \u0060Gen.choose\u0060 will follow\n[Postel\u0027s law](https://en.wikipedia.org/wiki/Robustness_principle) and \u0027know\nwhat you meant\u0027:*)\n\n(***define-output:ChooseWhenLowIsHigherThanHigh***)\nGen.choose (99, 42) |\u003E Gen.sampleWithSize 0 10\n\n(**In this example, the first value is greater than the second value, but\n\u0060Gen.choose\u0060 will happily interpret this as a range, and produce values between\n42 and 99, both included:*)\n\n(***include-it:ChooseWhenLowIsHigherThanHigh***)\n\n(**Since both values are included, if you set both to the same value, you\u0027ll\neffectively constrain the generator to that single value, and it\u0027ll behave like\n\u0060Gen.constant\u0060.\n\n#### Elements\n\nYou can use the \u0060Gen.elements\u0060 function to create a generator of singular\nvalues drawn from a collection of possible values. The collection is inclusive,\nwhich means that both the first and last element, as well as all elements\nbetween, can be drawn.\n\nIn the following example, a list of arbitrary integers define the collection of\npossible values. The result is a generator that creates \u0060int\u0060 values guaranteed\nto be one of these values. Since \u0060Gen.elements\u0060 doesn\u0027t rely on the \u0060size\u0060\nargument, it\u0027s \u00600\u0060 in this example, but any value would do; it wouldn\u0027t change\nthe result.*)\n\n(***define-output:ElementsExample***)\nGen.elements [42; 1337; 7; -100; 1453; -273] |\u003E Gen.sampleWithSize 0 10\n\n(**The result of this expression is a list of ten sample values. Each value is\na single integer drawn from the collection of numbers:*)\n\n(***include-it:ElementsExample***)\n\n(**All elements are equally likely to be drawn from the collection; we say that\nthe random function has a uniform distribution. One easy way to affect the\ndistribution is to put more than one identical element into the collection:*)\n\n(***define-output:SkewedElementsExample***)\nGen.elements [\u0022foo\u0022; \u0022foo\u0022; \u0022bar\u0022] |\u003E Gen.sampleWithSize 0 10\n\n(**In the above example, the value \u0060\u0022foo\u0022\u0060 appears twice, so is twice as likely\nto be drawn from the collection:*)\n\n(***include-it:SkewedElementsExample***)\n\n(**The above examples all use \u0060list\u0060 values as input, but you can use any \u0060seq\u0060\nexpression, including \u0060list\u0060 and \u0060array\u0060 values, as long as the sequence is\nfinite.\n\n#### GrowingElements\n\nEssentially \u0060Gen.growingElements\u0060 is like \u0060Gen.elements\u0060 but also taking \u0060size\u0060 into account.\n\nYou can use the \u0060Gen.growingElements\u0060 function to create a generator of singular\nvalues drawn *among an initial segment* of possible values. The size of this\ninitial segment increases with the \u0060size\u0060 parameter.\n\nIn the following example, a list of ten characters define the collection of\npossible values. The result is a generator that creates \u0060char\u0060 values guaranteed\nto be one of these values. Since \u0060Gen.growingElements\u0060 relies on the \u0060size\u0060\nargument, it\u0027s \u00603\u0060 in this example, which means only values from the segment\n\u0060[\u0027a\u0027; \u0027b\u0027; \u0027c\u0027]\u0060 will be returned.*)\n\n(***define-output:GrowingElementsExample***)\nGen.growingElements [\u0027a\u0027; \u0027b\u0027; \u0027c\u0027; \u0027d\u0027; \u0027e\u0027; \u0027f\u0027; \u0027g\u0027; \u0027h\u0027; \u0027i\u0027; \u0027j\u0027] |\u003E Gen.sampleWithSize 3 10\n\n(**The result of this expression is a list of ten sample values. Each value is\na single character drawn from the segment \u0060[\u0027a\u0027; \u0027b\u0027; \u0027c\u0027]\u0060:*)\n\n(***include-it:GrowingElementsExample***)\n\n(**Let\u0027s run \u0060Gen.growingElements\u0060 again, with the same input but with size \u00607\u0060:*)\n\n(***define-output:GrowingElementsAnotherExample***)\nGen.growingElements [\u0027a\u0027; \u0027b\u0027; \u0027c\u0027; \u0027d\u0027; \u0027e\u0027; \u0027f\u0027; \u0027g\u0027; \u0027h\u0027; \u0027i\u0027; \u0027j\u0027] |\u003E Gen.sampleWithSize 7 10\n\n(**The result of this expression is a list of ten sample values. Each value is\nnow a single character drawn from the segment \u0060[\u0027a\u0027; \u0027b\u0027; \u0027c\u0027; \u0027d\u0027; \u0027e\u0027; \u0027f\u0027; \u0027g\u0027]\u0060:*)\n\n(***include-it:GrowingElementsAnotherExample***)\n\n(**The above examples all use \u0060list\u0060 values as input, but you can use any \u0060seq\u0060\nexpression, including \u0060list\u0060 and \u0060array\u0060 values, as long as the sequence is\nfinite.\n\n#### Map\n\nSometimes, you need to use a generator of one type in order to create a\ngenerator of another type. For instance, you may need a \u0060byte\u0060 value between 0\nand 127. That sounds just like a job for \u0060Gen.choose\u0060, but unfortunately,\n\u0060Gen.choose (0, 127)\u0060 is a \u0060Gen\u003Cint\u003E\u0060, and not a \u0060Gen\u003Cbyte\u003E\u0060. One way to\nproduce a \u0060Gen\u003Cbyte\u003E\u0060 from a \u0060Gen\u003Cint\u003E\u0060 is to use \u0060Gen.map\u0060:*)\n\n(***define-output:IntToByteMapExample***)\nGen.choose (0, 127) |\u003E Gen.map byte |\u003E Gen.sampleWithSize 0 10\n\n(**This example uses the \u0060byte\u0060 _function_ to cast any \u0060int\u0060 created by\n\u0060Gen.choose (0, 127)\u0060 to a \u0060byte\u0060 value:*)\n\n(***include-it:IntToByteMapExample***)\n\n(**This is only a basic example of the concept of \u0060Gen.map\u0060. In this particular\nexample, you could also have used \u0060Gen.elements [0uy..127uy]\u0060 to achieve the\nsame result without using \u0060Gen.map\u0060, so let\u0027s consider a second\nexample.\n\nAssume that you need to create a date in a particular month; e.g. November\n2019. You can do that by creating an integer for the day of the month, and then\ncombine \u0060Gen.map\u0060 with an anymous function to get the desired date:*)\n\n(***define-output:MapIntToDateExample***)\nGen.choose (1, 30)\n|\u003E Gen.map (fun i -\u003E DateTime(2019, 11, i).ToString \u0022u\u0022)\n|\u003E Gen.sampleWithSize 0 10\n\n(**In this example, the generated \u0060DateTime\u0060 value is immediately formatted as\na \u0060string\u0060, so that the output is more readable:*)\n\n(***include-it:MapIntToDateExample***)\n\n(**This causes the resulting generator to have the type \u0060Gen\u003Cstring\u003E\u0060, but if\nyou omit calling \u0060ToString \u0022u\u0022\u0060, its type would have been \u0060Gen\u003CDateTime\u003E\u0060.\n\n#### Lists\n\nYou can generate lists from individual value generators using \u0060Gen.listOf\u0060,\n\u0060Gen.listOfLength\u0060, and \u0060Gen.nonEmptyListOf\u0060. These functions are\n*combinators*, which means that they don\u0027t generate individual values\nthemselves, but rather use another generator to build values. For instance,\nyou can use \u0060Gen.constant\u0060 to generate lists that all contain the same value:*)\n\n(***define-output:ConstantListOfExample***)\nGen.constant 42 |\u003E Gen.listOf |\u003E Gen.sampleWithSize 1 10\n\n(**This combination uses \u0060Gen.constant 42\u0060 as an individual generator, and then\ngenerates lists containing the the number 42. While the value(s) in the list is\nalways 42, the length of the generated lists varies.*)\n\n(***include-it:ConstantListOfExample***)\n\n(**The length of the generated list is determined by the \u0060size\u0060 argument. In\nthis example, the \u0060size\u0060 argument is \u00601\u0060, so the generated lists are short.\nNote that while there\u0027s a correlation beteen \u0060size\u0060 and the length of the\nlists, you can\u0027t rely on a deterministic length. For that, there\u0027s\n\u0060Gen.listOfLength\u0060:*)\n\n(***define-output:ListOfLengthExample***)\nGen.choose (24, 42) |\u003E Gen.listOfLength 5 |\u003E Gen.sampleWithSize 0 10\n\n(**This example uses \u0060Gen.choose (24, 42)\u0060 in order to generate individual\ninteger values between 24 and 42. It then pipes this generator into\n\u0060Gen.listOfLength 5\u0060 in order to generate lists with exactly five elements:*)\n\n(***include-it:ListOfLengthExample***)\n\n(**Notice that all sample lists have exactly five elements.\n\nYou can also use \u0060Gen.nonEmptyListOf\u0060 to create lists that are guaranteed to\nhave at least one element. Like the other list generators, it uses a\nsingle-value generator to generate its elements:*)\n\n(***define-output:NonEmptyListExample***)\nGen.elements [\u0022foo\u0022; \u0022bar\u0022; \u0022baz\u0022] |\u003E Gen.nonEmptyListOf |\u003E Gen.sampleWithSize 20 4\n\n(**Like \u0060Gen.listOf\u0060, \u0060Gen.nonEmptyListOf\u0060 uses \u0060size\u0060 to control the length\nof the generated lists. They may still be small, but the larger the \u0060size\u0060\nargument, the larger the lists may become.*)\n\n(***include-it:NonEmptyListExample***)\n\n(**In this example, each element is drawn from the small set \u0022foo\u0022, \u0022bar\u0022, and\n\u0022baz\u0022. The lists are guaranteed to have at least a single element, but may be\nlonger.\n\n#### Shuffle\n\nYou can use the \u0060Gen.shuffle\u0060 function to create a generator that generates a\nrandom permutation of a given finite sequence.\n\nIn the following example, the\n[metasyntactic variables](https://en.wikipedia.org/wiki/Metasyntactic_variable)\n\u0022foo\u0022, \u0022bar\u0022, \u0022baz\u0022, and \u0022qux\u0022 define the input sequence:*)\n\n(***define-output:ShuffleExample***)\nGen.shuffle [\u0022foo\u0022; \u0022bar\u0022; \u0022baz\u0022; \u0022qux\u0022] |\u003E Gen.sampleWithSize 0 6\n\n(**Since \u0060Gen.shuffle\u0060 doesn\u0027t rely on the \u0060size\u0060 argument, it\u0027s \u00600\u0060 in this\nexample, but any value would do; it wouldn\u0027t change the result.\n\nThe result of this expression is a list of lists, where each list contains\nthe original input list, but shuffled:*)\n\n(***include-it:ShuffleExample***)\n\n(**The above example uses a \u0060list\u0060 value as input, but you can use any \u0060seq\u0060\nexpression, including \u0060list\u0060 and \u0060array\u0060 values, as long as the sequence is\nfinite.\n\nAll shuffles are equally likely; the input order isn\u0027t excluded, so the\noutput may be the same as the input. Due to the nature of combinatorics, this\nis more likely to happen the smaller the input list is.\n\n#### Tuples\n\nSometimes you need to generate tuples of values. You can use the functions\n\u0060Gen.two\u0060, \u0060Gen.three\u0060, and \u0060Gen.four\u0060 to turn a single-value generator into a\ngenerator of tuples.\n\nImagine that you need to generate two-dimensional points; you may, for\ninstance, be implementing\n[Conway\u0027s Game of Life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life).\nPoints can be modelled as tuples of numbers. If you\u0027re modelling a grid, you\ncan use integers:*)\n\n(***define-output:GenTwoIntegerExample***)\nGen.choose (-100, 100) |\u003E Gen.two |\u003E Gen.sampleWithSize 0 10\n\n(**\u0060Gen.two\u0060 uses a single-value generator to create a generator of two-element\ntuples. This example generates 10 sample points, where each coordinate is\nbetween -100 and 100:*)\n\n(***include-it:GenTwoIntegerExample***)\n\n(**If you want to model a coordinate system in three-dimensional space, you may\ndecide to use floating points instead:*)\n\n(***define-output:GenThreeFloatExample***)\nGen.elements [-10.0..0.01..10.0] |\u003E Gen.three |\u003E Gen.sampleWithSize 0 10\n\n(**In this example, you first use \u0060Gen.elements\u0060 to draw a floating point value\nfrom between -10 and 10, with two decimals; that defines a \u0060Gen\u003Cfloat\u003E\u0060.\nSecond, \u0060Gen.three\u0060 takes that \u0060Gen\u003Cfloat\u003E\u0060 and turns it into a\n\u0060Gen\u003Cfloat * float * float\u003E\u0060:*)\n\n(***include-it:GenThreeFloatExample***)\n\n(**Finally, \u0060Gen.four\u0060 transforms a single-value generator into a generator of\nfour-element tuples. As all the other *combinators* in the \u0060Gen\u0060 module, you\ncan combine it with other functions to define more specific values. Imagine,\nfor instance, that you need to create \u0060System.Version\u0060 values. This type, which\ncaptures a version of something, for example an operating system, or a library,\nmodels version numbers as a composite of four numbers: *major*, *minor*,\n*build*, and *revision* - all integers. One of the constructor overloads of\nthis class takes all four numbers, so you can combine \u0060Gen.four\u0060 with \u0060Gen.map\u0060\nto create Version values:*)\n\n(***define-output:GenFourVersionExample***)\nGen.choose (0, 9)\n|\u003E Gen.four\n|\u003E Gen.map (System.Version \u003E\u003E string)\n|\u003E Gen.sampleWithSize 0 10\n\n(**This example starts with \u0060Gen.choose (0, 9)\u0060 to define a \u0060Gen\u003Cint\u003E\u0060 that\ncreates integer values betwen 0 and 9 (both included). Second, you pipe the\n\u0060Gen\u003Cint\u003E\u0060 value into \u0060Gen.four\u0060, which returns a \u0060Gen\u003Cint * int * int * int\u003E\u0060.\nThird, you can pipe that generator into \u0060Gen.map\u0060, using the constructor\noverload of \u0060Version\u0060 that takes four integers; in F# 4, constructors can be\ntreated as functions, and a constructor with four arguments can be treated as a\nfunction that takes a four-element tuple.*)\n\n(***include-it:GenFourVersionExample***)\n\n(**This example composes the \u0060Version\u0060 constructor with the \u0060string\u0060 function,\nin order to produce a more readable output. The resulting generator has the\ntype \u0060Gen\u003Cstring\u003E\u0060, but if you remove the \u0060string\u0060 composition, the type would\nbe \u0060Gen\u003CVersion\u003E.\u0060\n\n#### Filter\n\nWhile you can use the above generators and combinators to define various custom\nrules for generating values, occasionally you have a requirement where the\neasiest solution is to throw away some generated candidates. \u0060Gen.filter\u0060 gives\nyou that opportunity.\n\nImagine, for example, that you have to create lists with two elements, but with\nthe restriction that the two elements must be different. One way to do that\ncould be to first generate a pair of values, and then use \u0060Gen.filter\u0060 to\nremove all pairs where the elements are equal. Subsequently, you can use\n\u0060Gen.map\u0060 to convert the pair to a list:*)\n\n(***define-output:GenFilterExample***)\nGen.choose (1, 100)\n|\u003E Gen.two\n|\u003E Gen.filter (fun (x, y) -\u003E x \u003C\u003E y)\n|\u003E Gen.map (fun (x, y) -\u003E [x; y])\n|\u003E Gen.sampleWithSize 0 10\n\n(**This expression generates 10 sample lists, each containing two different\nnumbers:*)\n\n(***include-it:GenFilterExample***)\n\n(**When using \u0060Gen.filter\u0060, be sure to provide a predicate with a high chance\nof returning \u0060true\u0060. If the predicate discards \u0027too many\u0027 candidates, it may\ncause tests to run slower, or to not terminate at all. If your filter is\naggressive, consider using \u0060Gen.tryFilter\u0060 instead of \u0060Gen.filter\u0060.\n \n## Default Generators and Shrinkers based on type\n\nFsCheck defines default test data generators and shrinkers for some often used types, for example\nunit, bool, byte, int, float, char, string, DateTime, lists, array 1D and 2D, Set, Map, objects and \nfunctions from and to any of the above. Furthermore, by using reflection, FsCheck can derive \ndefault implementations of record types, discriminated unions, tuples, enums and basic classes in terms \nof any primitive types that are defined (either in FsCheck or by you).\n\nYou do not need to define these explicity for every property: FsCheck can provide a property with \nappropriate generators and shrinkers for all of the property\u0027s arguments, if it knows them or \ncan derive them. Usually you can let type inference do the job of finding out these types \nbased on your properties. However if you want to coerce FsCheck to use a particular generator \nand shrinker, you can do so by providing the appropriate type annotations.\n\nFsCheck packages a generator and shrinker for a particular type in an \u0060Arbitrary\u0060 type. You can \nprovide FsCheck with an Arbitrary instance for your own types, by defining static members that \nreturn an instance of a subclass of \u0060Arbitrary\u003C\u0027a\u003E\u0060:*)\n\ntype MyGenerators =\n static member Tree() =\n {new Arbitrary\u003CTree\u003E() with\n override _.Generator = tree\n override _.Shrinker _ = Seq.empty }\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/TestData.cs,key=MyGenerators]\n\nReplace the \u0060\u0027a\u0060 by the particular type you are defining an Arbitary instance for. \nOnly the \u0060Generator\u0060 method needs to be defined; \u0060Shrinker\u0060 by default returns the empty \nsequence which means no shrinking will be done for this type).\n\nAs the F# code shows, you can create your own subclass of Arbitrary and return that, or you can use one of the \u0060Arb.from\u0060\nmethods or functions.\n\nNow, to make FsCheck aware of all Arbitrary instances in this class, you can add it to the Config:*)\n\nlet myConfig = Config.Quick.WithArbitrary([ typeof\u003CMyGenerators\u003E ])\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/TestData.cs,key=register]\n\nIf you use this config, FsCheck now knows about \u0060Tree\u0060 types, and can not only generate Tree values, but also e.g. lists, tuples and \noption values containing Trees:*)\n\n(***define-output:RevRevTree***)\nlet revRevTree (xs:list\u003CTree\u003E) = \n List.rev(List.rev xs) = xs\nCheck.One(myConfig, revRevTree)\n\n(***include-output:RevRevTree***)\n\n(**\nTo generate types with a generic type argument, e.g.*)\n\ntype Box\u003C\u0027a\u003E = Whitebox of \u0027a | Blackbox of \u0027a\n\n(**\nyou can use the same principle - except to write the generator and shrinker you now need an instance for whatever the generic parameter(s) will be\nwhen build the generator. To this end, the methods can take argument of type \u0060Arbitrary\u003C\u0027T\u003E. For example, the class \u0060MyGenerators\u0060 can be extended as follows:*)\n\nlet boxGen\u003C\u0027a\u003E (contents:Arbitrary\u003C\u0027a\u003E) : Gen\u003CBox\u003C\u0027a\u003E\u003E = \n gen { let! a = contents.Generator\n return! Gen.elements [ Whitebox a; Blackbox a] }\n\ntype MyTreeGenerator =\n static member Tree() =\n {new Arbitrary\u003CTree\u003E() with\n override x.Generator = tree\n override x.Shrinker t = Seq.empty }\n static member Box(contents:Arbitrary\u003C\u0027a\u003E) = contents |\u003E boxGen |\u003E Arb.fromGen\n\n(**\nNow, when FsCheck examines the static methods on \u0060MyTreeGenerator\u0060, it will \u0022inject\u0022 the necessary \u0060Arbitrary\u0060 instance. For example,\nif we request to generate a \u0060Box\u003Cint\u003E\u0060, FsCheck first finds the \u0060Arbitrary\u0060 instance for \u0060int\u0060, and then calls \u0060MyTreeGenerator.Box\u0060 with\nthat instance to get an \u0060Arbitrary\u0060 instance for \u0060Box\u003Cint\u003E\u0060. You can think of this as a parameter-driven dependency injection.\n\nThis allows you to define generic generators recursively. Have a look at the FsCheck source for examples of default Arbitrary implementations \nto get a feeling of how to write such Arbitrary instances. The Arb module or class should help you with this task as well.\n\nNow, the following property can be checked:*)\n\n(***define-output:RevRevBox***)\nlet revRevBox (xs:list\u003CBox\u003Cint\u003E\u003E) = \n List.rev(List.rev xs) = xs\nCheck.One(Config.Quick.WithArbitrary([typeof\u003CMyTreeGenerator\u003E]), revRevBox)\n\n(***include-output:RevRevBox***)\n\n(**\nNote that the class needs not be tagged with attributes in any way. FsCheck determines the type of \nthe generator by the return type of each static member.\n\nAlso note that in this case we actually didn\u0027t need to write a generator or shrinker: FsCheck can \nderive suitable instances using reflection for discriminated unions, record types and enums.\n\n### Notes about the default Generators and Shrinkers\n\nMost of the default Arbitrary instances are documented with xml comments that can be discovered via IntelliSense.\nHowever, there are some important things to notice that are listed here to avoid much duplicating comments.\n\n- Most of the default sized generators of the number-like types produce the uniformly distributed values in the ranges specified in the comments.\n- The same thing with the default DoNotSize generators of the number-like types except Decimal.\n- Most of the default generators of the collection types are just \u0022wrappers\u0022 around the F# list. Thus, you can assume that they are generated and shrinked the same way.\n \n## Useful methods on the Arb module\n\n- \u0060Arb.from\u003C\u0027a\u003E\u0060 returns the registered Arbitrary instance for the given type \u0027a\n- \u0060Arb.fromGen\u0060 makes a new Arbitrary instance from just a given generator - the shrinker return the empty sequence\n- \u0060Arb.fromGenShrink\u0060 make a new Arbitrary instance from a given generator and shrinker. This is equivalent to implementing Arbitrary yourself, but may be shorter.\n- \u0060Arb.generate\u003C\u0027a\u003E\u0060 returns the generator of the registered Arbitrary instance for the given type \u0027a\n- \u0060Arb.shrink\u0060 return the immediate shrinks of the registered Arbitrary instance for the given value\n- \u0060Arb.convert\u0060 given conversion functions to (\u0027a -\u003E\u0027b) and from (\u0027b -\u003E\u0027a), converts an Arbitrary\u003C\u0027a\u003E instance to an Arbitrary\u003C\u0027b\u003E\n- \u0060Arb.filter\u0060 filters the generator and shrinker for a given Arbitrary instance to contain only those values that match with the given filter function\n- \u0060Arb.mapFilter\u0060 maps the generator and filter the shrinkers for a given Arbitrary instance. Mapping the generator is sometimes faster, e.g. for a PositiveInt it is faster to take the absolute value than to filter the negative values.\n- \u0060Arb.Default\u0060 is a type that contains all the default Arbitrary instances as they are shipped and registerd by FsCheck by default. This is useful when you override a default generator - typically this is because you want to filter certain values from it, and then you need to be able to refer to the default generator in your overriding generator.*)"},{"uri":"https://fscheck.github.io/FsCheck/TipsAndTricks.html","title":"Tips and Tricks\r\n","content":"(*** hide ***)\n#I @\u0022../src/FsCheck/bin/Release/netstandard2.0\u0022\n#r @\u0022FsCheck\u0022\nopen FsCheck\nopen FsCheck.FSharp\nopen System\n\n(**\n# Tips and Tricks\n \n## Properties of functions\n\nPerhaps surprisingly, FsCheck can generate random functions, \u0060Func\u0060 and \u0060Action\u0060s. As a result, it can check properties of \nfunctions. For example, we can check associativity of function composition as follows:*)\n\n(***define-output:associativity***)\nlet associativity (x:int) (f:int-\u003Efloat,g:float-\u003Echar,h:char-\u003Eint) = ((f \u003E\u003E g) \u003E\u003E h) x = (f \u003E\u003E (g \u003E\u003E h)) x\nCheck.Quick associativity\n\n(***include-output:associativity***)\n\n(**\nFsCheck can generate all functions with a target type that it can generate. In addition, the functions are pure and total -\nthe former means that if you give a generated function the same value as input, it will keep returning that same value as output,\nno matter how many times you call it. The latter means that the function does not throw any exceptions and always terminates.\n\nIf a counter-example is found, function values will be displayed as \u0060\u003Cfunc\u003E\u0060. However, FsCheck can show \nyou the generated function in more detail, if you ask it to generate a \u0060Function\u0060 type, which has an embedded \u0022real\u0022 function. \nFsCheck can even shrink \u0060Function\u0060s. For example:*)\n\n(***define-output:mapRec***)\nlet mapRec (Fun f) (l:list\u003Cint\u003E) =\n not l.IsEmpty ==\u003E\n lazy (List.map f l = ((*f \u003C|*) List.head l) :: List.map f (List.tail l))\nCheck.Quick mapRec\n\n(***include-output:mapRec***)\n\n(**\nThe type \u0060Function\u003C\u0027a,\u0027b\u003E\u0060 - here deconstructed using the single case active pattern \u0060Fun\u0060 - \nrecords a map of all the arguments it was called with, and the result it produced. \nIn your properties, you can extract the actual function by pattern matching as in the example. \n\u0060Function\u0060 is used to print the function, and also to shrink it.\n \n## Use pattern matching instead of forAll to use custom generators\n\nTo define a generator that generates a subset of the normal range of values for an existing type,\nsay all the even ints, it makes properties more readable if you define a single-case union\ncase, and register a generator for the new type:\n*)\n\n(***define-output:EvenInt***)\ntype EvenInt = EvenInt of int with\n static member op_Explicit(EvenInt i) = i\n\ntype ArbitraryModifiers =\n static member EvenInt() = \n ArbMap.defaults\n |\u003E ArbMap.arbitrary\u003Cint\u003E \n |\u003E Arb.filter (fun i -\u003E i % 2 = 0) \n |\u003E Arb.convert EvenInt int\n \nlet \u0060\u0060generated even ints should be even\u0060\u0060 (EvenInt i) = i % 2 = 0\nCheck.One(Config.Quick.WithArbitrary([typeof\u003CArbitraryModifiers\u003E]), \u0060\u0060generated even ints should be even\u0060\u0060)\n\n(***include-output:EvenInt***)\n\n(**\nIt\u0027s now easy to define custom shrink functions as well.\n\nFsCheck uses this pattern frequently, e.g. \u0060NonNegativeInt\u0060, \u0060PositiveInt\u0060, \u0060StringWithoutNullChars\u0060 etc. See the\ndefault Arbitrary instances on the \u0060Arb.Default\u0060 type.\n\nAlso, for these kinds of generators, the \u0060Arb.filter\u0060, \u0060Arb.convert\u0060 and \u0060Arb.mapFilter\u0060 functions will come in handy.\n \n## An equality comparison that prints the left and right sides of the equality\n\nProperties commonly check for equality. If a test case fails, FsCheck prints the counterexample, but \nsometimes it is useful to print the left and right side of the comparison, especially if you \ndo some complicated calculations with the generated arguments first. To make this easier, you can \ndefine your own labelling equality combinator:*)\n\n(***define-output:testCompare***)\nlet (.=.) left right = left = right |\u003E Prop.label (sprintf \u0022%A = %A\u0022 left right)\n\nlet testCompare (i:int) (j:int) = 2*i\u002B1 .=. 2*j-1\nCheck.Quick testCompare\n\n(***include-output:testCompare***)\n\n(**\nOf course, you can do this for any operator or function that you often use.\n \n## Some ways to run FsCheck tests\n\n* By adding properties and generators to an fsx file in your project. It\u0027s easy to execute, just press \nctrl-a and alt-enter, and the results are displayed in F# Interactive. Be careful when referencing dlls \nthat are built in your solution; Versions of F# Interactive earlier than 3.1.2 will lock those for the remainder of the session, \nand you won\u0027t be able to build until you quit the session. One solution is to include the source files \ninstead of the dlls, but that makes the process slower. Useful for smaller projects. Difficult to debug though.\n* By making a separate console application. Easy to debug, and no annoying locks on assemblies. Your best option \nif you use only FsCheck for testing and your properties span multiple assemblies.\n* By using another unit testing framework. Useful if you have a mixed FsCheck/unit testing approach \n(some things are easier to check using unit tests, and vice versa), and you like a graphical runner. \nDepending on what unit testing framework you use, you may get good integration with Visual Studio for free. Also have a look\nat some of the existing integrations with test runners like Xunit.NET, NUnit, Fuchu.\n\n## Testing mutable types without using Command or StateMachine\n\nFor some relatively simple mutable types you might feel more comfortable just writing straightforward FsCheck properties without\nusing the \u0060Command\u0060 or \u0060StateMachine\u0060 API. This is certainly possible, but for shrinking FsCheck assumes that it can\nre-execute the same test multiple times without the inputs changing. If you call methods or set properties on a generated object\nthat affect its state, this assumption does not hold and you\u0027ll see some weird results.\n\nThe simplest way to work around this is not to write a generator for your mutable object at all, but instead write an FsCheck property\nthat takes all the values necessary to construct the object, and then simply construct the object in the beginning of your test. For example, suppose we want to test\na mutable list:*)\n\nlet testMutableList =\n Prop.forAll (Arb.fromGen(Gen.choose (1,10))) (fun capacity -\u003E \n let underTest = new System.Collections.Generic.List\u003Cint\u003E(capacity)\n Prop.forAll (ArbMap.defaults |\u003E ArbMap.arbitrary\u003Cint[]\u003E) (fun itemsToAdd -\u003E\n underTest.AddRange(itemsToAdd)\n underTest.Count = itemsToAdd.Length))\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/TipsAndTricks.cs,key=testMutableList]\n\nThis works, as a bonus you get shrinking for free.\n\nIf you do want to write a generator for your mutable type, this can be made to work but if\nyou mutate a generated object during a test, either:\n\n* Disable shrinking, typically by wrapping all types into \u0060DontShrink\u0060; or\n* Clone or otherwise \u0027reset\u0027 the generated mutable object at the beginning or end of every test.\n\n## Replaying a failed test\n\nWhen you have a failed test, it\u0027s often useful for debugging to be able to replay exactly those inputs. For this reason, FsCheck displays the\nseed of its pseudo-random number generator when a test fails. Look for the bit of text that looks like: \u0060(StdGen (1145655947,296144285))\u0060.\n\nTo replay this test, which should have the exact same output, use the \u0060Replay\u0060 field on \u0060Config\u0060:*)\n\nCheck.One(Config.Quick.WithReplay(1145655947UL,296144285UL), fun x -\u003E abs x \u003E= 0)\n\n(**\nIn C#:\n\n [lang=csharp,file=../examples/CSharp.DocSnippets/TipsAndTricks.cs,key=replay]\n*)\n\n(**\n## Checking properties in parallel\n\nFsCheck can evaluate properties in parallel.\nThis feature may be useful to speed-up your cpu-heavy properties and custom arbitraries.\nAlso this is invaluable for running asynchronous propertiess, i.e. when you are doing asynchronous IO inside prop.\nDon\u0027t forget to wrap your property in \u0060Task\u0060 or \u0060Async\u0060 in that case.\n\nTo run a property in parallel, use the \u0060ParallelRunConfig\u0060 field on \u0060Config\u0060:*)\n\nCheck.One(\n Config.Quick.WithParallelRunConfig({ MaxDegreeOfParallelism = System.Environment.ProcessorCount }),\n fun x -\u003E abs x \u003E= 0\n)\n\n(**\n\u0060System.Environment.ProcessorCount\u0060 is a good default for cpu-bound work.\nFor io-bound work it\u0027s usually enough to set \u0060ParallelRunConfig\u0060 to 1.\n*)\n\nCheck.One(\n Config.Verbose.WithParallelRunConfig({ MaxDegreeOfParallelism = 1 } ),\n fun (x:int) -\u003E \n async { \n do! Async.Sleep (abs x)\n return true\n }\n)"},{"uri":"https://fscheck.github.io/FsCheck/users.html","title":"Who is using FsCheck?\r\n","content":"# Who is using FsCheck?\r\n\r\nPlease send a pull request if you want to be added.\r\n\r\n* [Fantomas](https://github.com/dungpa/fantomas)\r\n* [fsharpx](https://github.com/fsharp/fsharpx)\r\n* [FsPickler](https://github.com/nessos/FsPickler)\r\n* [LinqOptimizer](https://github.com/nessos/LinqOptimizer)\r\n* [Credit Suisse](http://www.credit-suisse.com)\r\n* [BlueMountain Capital](https://github.com/bluemountaincapital)\r\n* [Tachyus](http://tachyus.com/)\r\n* [Fred](https://github.com/frankshearar/Fred/)\r\n* [Digital Furnace Games](http://www.digitalfurnacegames.com/)\r\n* [15below](http://15below.com/)\r\n* [AntaniXml](http://giacomociti.github.io/AntaniXml/)\r\n* [DoctestInteractive](https://github.com/tomakita/DoctestInteractive/)\r\n* [Darklang](https://github.com/darklang/dark/)\r\n\r\n## Academia\r\n\r\nYes, to my surprise people are writing academic papers about FsCheck. Well, at least one!\r\n\r\n* Bernhard K. Aichernig and Richard Schumi. Property-based Testing with FsCheck by Deriving \r\nProperties from Business Rule Models. In 2016 IEEE Ninth International Conference on Software\r\nTesting, Verification, and Validation Workshops (ICSTW), 13th Workshop on Advances in Model \r\nBased Testing (A-MOST 2016), IEEE, 2016. In press. [Link](http://truconf.ist.tugraz.at/index.php/2016/03/04/publication-at-a-most-2016/)\r\n"}]
\ No newline at end of file
+[{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck.html","title":"FsCheck","content":"Runner \nArbitrary\u003C\u0027T\u003E \nCheck \nCheckExtensions \nConfig \nConfigExtensions \nDoNotShrink\u003C\u0027a\u003E \nDoNotSize\u003C\u0027a\u003E \nFixedLengthArray\u003C\u0027T\u003E \nFunction\u003C\u0027a, \u0027b\u003E \nGen\u003C\u0027T\u003E \nHostName \nIArbMap \nIPv4Address \nIPv6Address \nIRunner \nIntWithMinMax \nInterval \nNegativeInt \nNonEmptyArray\u003C\u0027T\u003E \nNonEmptySet\u003C\u0027T\u003E \nNonEmptyString \nNonNegativeInt \nNonNull\u003C\u0027a\u003E \nNonWhiteSpaceString \nNonZeroInt \nNormalFloat \nOutcome \nParallelRunConfig \nPositiveInt \nProperty \nReplay \nResult \nResultContainer \nRnd \nStringNoNullChar \nTestData \nTestResult \nThrowingFunction\u003C\u0027a, \u0027b\u003E \nUnicodeChar \nUnicodeString \nXmlEncodedString"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental.html","title":"FsCheck.Experimental","content":"StateMachine \nDisposeCall\u003C\u0027Actual\u003E \nIOperation \nIOperationResult \nMachine\u003C\u0027Actual, \u0027Model\u003E \nMachineRun\u003C\u0027Actual, \u0027Model\u003E \nMethodCall\u003C\u0027Actual\u003E \nNew\u003C\u0027Actual\u003E \nObjectMachine\u003C\u0027Actual\u003E \nObjectMachineModel \nOperation\u003C\u0027Actual, \u0027Model\u003E \nOperationResult\u003C\u0027a\u003E \nSetup\u003C\u0027Actual, \u0027Model\u003E \nStateMachineExtensions \nStopOperation\u003C\u0027Actual, \u0027Model\u003E \nTearDown\u003C\u0027Actual\u003E"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp.html","title":"FsCheck.FSharp","content":"Arb \nArbMap \nArbPatterns \nGen \nGenBuilder \nGenOperators \nProp \nPropOperators"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent.html","title":"FsCheck.Fluent","content":"Arb \nArbMap \nGen \nProp"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals.html","title":"FsCheck.Internals","content":"Numeric \nShrink\u003C\u0027T\u003E"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-runner.html","title":"Runner","content":"Runner \n \nRunner.stepsSeq \nstepsSeq \nRunner.argumentsToString \nargumentsToString \nRunner.onStartFixtureToString \nonStartFixtureToString \nRunner.onFailureToString \nonFailureToString \nRunner.onFinishedToString \nonFinishedToString \nRunner.onArgumentsToString \nonArgumentsToString \nRunner.onShrinkToString \nonShrinkToString \nRunner.consoleRunner \nconsoleRunner"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-runner.html#stepsSeq","title":"Runner.stepsSeq","content":"Runner.stepsSeq \nstepsSeq \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-runner.html#argumentsToString","title":"Runner.argumentsToString","content":"Runner.argumentsToString \nargumentsToString \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-runner.html#onStartFixtureToString","title":"Runner.onStartFixtureToString","content":"Runner.onStartFixtureToString \nonStartFixtureToString \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-runner.html#onFailureToString","title":"Runner.onFailureToString","content":"Runner.onFailureToString \nonFailureToString \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-runner.html#onFinishedToString","title":"Runner.onFinishedToString","content":"Runner.onFinishedToString \nonFinishedToString \n\nA function that returns the default string that is printed as a result of the test.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-runner.html#onArgumentsToString","title":"Runner.onArgumentsToString","content":"Runner.onArgumentsToString \nonArgumentsToString \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-runner.html#onShrinkToString","title":"Runner.onShrinkToString","content":"Runner.onShrinkToString \nonShrinkToString \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-runner.html#consoleRunner","title":"Runner.consoleRunner","content":"Runner.consoleRunner \nconsoleRunner \n\nA runner that prints results to the standard output.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-arbitrary-1.html","title":"Arbitrary\u003C\u0027T\u003E","content":"Arbitrary\u003C\u0027T\u003E \n \nArbitrary\u003C\u0027T\u003E.( .ctor ) \n( .ctor ) \nArbitrary\u003C\u0027T\u003E.Shrinker \nShrinker \nArbitrary\u003C\u0027T\u003E.Generator \nGenerator"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-arbitrary-1.html#( .ctor )","title":"Arbitrary\u003C\u0027T\u003E.( .ctor )","content":"Arbitrary\u003C\u0027T\u003E.( .ctor ) \n( .ctor ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-arbitrary-1.html#Shrinker","title":"Arbitrary\u003C\u0027T\u003E.Shrinker","content":"Arbitrary\u003C\u0027T\u003E.Shrinker \nShrinker \n\nReturns a sequence of the immediate shrinks of the given value. The immediate shrinks should not include\ndoubles or the given value itself. The default implementation returns the empty sequence (i.e. no shrinking).\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-arbitrary-1.html#Generator","title":"Arbitrary\u003C\u0027T\u003E.Generator","content":"Arbitrary\u003C\u0027T\u003E.Generator \nGenerator \n\nReturns a generator for \u0027a.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html","title":"Check","content":"Check \n \nCheck.All \nAll \nCheck.All \nAll \nCheck.Method \nMethod \nCheck.One \nOne \nCheck.One \nOne \nCheck.Quick \nQuick \nCheck.Quick \nQuick \nCheck.QuickAll \nQuickAll \nCheck.QuickAll \nQuickAll \nCheck.QuickThrowOnFailure \nQuickThrowOnFailure \nCheck.QuickThrowOnFailureAll \nQuickThrowOnFailureAll \nCheck.QuickThrowOnFailureAll \nQuickThrowOnFailureAll \nCheck.Verbose \nVerbose \nCheck.Verbose \nVerbose \nCheck.VerboseAll \nVerboseAll \nCheck.VerboseAll \nVerboseAll \nCheck.VerboseThrowOnFailure \nVerboseThrowOnFailure \nCheck.VerboseThrowOnFailureAll \nVerboseThrowOnFailureAll \nCheck.VerboseThrowOnFailureAll \nVerboseThrowOnFailureAll"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#All","title":"Check.All","content":"Check.All \nAll \n\nCheck all public static methods on the given type that have a testable return type with the given configuration.\nThis includes let-bound functions in a module.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#All","title":"Check.All","content":"Check.All \nAll \n\nCheck all public static methods on the given type that have a testable return type with the given configuration.\nThis includes let-bound functions in a module.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#Method","title":"Check.Method","content":"Check.Method \nMethod \n\nCheck the given property identified by the given MethodInfo.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#One","title":"Check.One","content":"Check.One \nOne \n\nCheck the given property using the given config, and the given test name.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#One","title":"Check.One","content":"Check.One \nOne \n\nCheck the given property using the given config.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#Quick","title":"Check.Quick","content":"Check.Quick \nQuick \n\nCheck one property with the quick configuration, and using the given name.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#Quick","title":"Check.Quick","content":"Check.Quick \nQuick \n\nCheck one property with the quick configuration.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#QuickAll","title":"Check.QuickAll","content":"Check.QuickAll \nQuickAll \n\nCheck all public static methods on the given type that have a testable return type with quick configuration\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#QuickAll","title":"Check.QuickAll","content":"Check.QuickAll \nQuickAll \n\nCheck all public static methods on the given type that have a testable return type with quick configuration\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#QuickThrowOnFailure","title":"Check.QuickThrowOnFailure","content":"Check.QuickThrowOnFailure \nQuickThrowOnFailure \n\nCheck one property with the quick configuration, and throw an exception if it fails or is exhausted.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#QuickThrowOnFailureAll","title":"Check.QuickThrowOnFailureAll","content":"Check.QuickThrowOnFailureAll \nQuickThrowOnFailureAll \n\nCheck all public static methods on the given type that have a testable return type with quick configuration\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#QuickThrowOnFailureAll","title":"Check.QuickThrowOnFailureAll","content":"Check.QuickThrowOnFailureAll \nQuickThrowOnFailureAll \n\nCheck all public static methods on the given type that have a testable return type with quick configuration, \nand throw on failure or exhaustion.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#Verbose","title":"Check.Verbose","content":"Check.Verbose \nVerbose \n\nCheck one property with the verbose configuration, and using the given name.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#Verbose","title":"Check.Verbose","content":"Check.Verbose \nVerbose \n\nCheck one property with the verbose configuration.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#VerboseAll","title":"Check.VerboseAll","content":"Check.VerboseAll \nVerboseAll \n\n Check all public static methods on the given type that have a testable return type with the verbose configuration\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#VerboseAll","title":"Check.VerboseAll","content":"Check.VerboseAll \nVerboseAll \n\n Check all public static methods on the given type that have a testable return type with the verbose configuration\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#VerboseThrowOnFailure","title":"Check.VerboseThrowOnFailure","content":"Check.VerboseThrowOnFailure \nVerboseThrowOnFailure \n\nCheck one property with the verbose configuration, and throw an exception if it fails or is exhausted.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#VerboseThrowOnFailureAll","title":"Check.VerboseThrowOnFailureAll","content":"Check.VerboseThrowOnFailureAll \nVerboseThrowOnFailureAll \n\n Check all public static methods on the given type that have a testable return type with the verbose configuration,\nand throws on failure or exhaustion.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-check.html#VerboseThrowOnFailureAll","title":"Check.VerboseThrowOnFailureAll","content":"Check.VerboseThrowOnFailureAll \nVerboseThrowOnFailureAll \n\n Check all public static methods on the given type that have a testable return type with the verbose configuration,\nand throws on failure or exhaustion.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-checkextensions.html","title":"CheckExtensions","content":"CheckExtensions \n \nCheckExtensions.Check \nCheck \nCheckExtensions.QuickCheck \nQuickCheck \nCheckExtensions.QuickCheck \nQuickCheck \nCheckExtensions.QuickCheckThrowOnFailure \nQuickCheckThrowOnFailure \nCheckExtensions.VerboseCheck \nVerboseCheck \nCheckExtensions.VerboseCheck \nVerboseCheck \nCheckExtensions.VerboseCheckThrowOnFailure \nVerboseCheckThrowOnFailure"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-checkextensions.html#Check","title":"CheckExtensions.Check","content":"CheckExtensions.Check \nCheck \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-checkextensions.html#QuickCheck","title":"CheckExtensions.QuickCheck","content":"CheckExtensions.QuickCheck \nQuickCheck \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-checkextensions.html#QuickCheck","title":"CheckExtensions.QuickCheck","content":"CheckExtensions.QuickCheck \nQuickCheck \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-checkextensions.html#QuickCheckThrowOnFailure","title":"CheckExtensions.QuickCheckThrowOnFailure","content":"CheckExtensions.QuickCheckThrowOnFailure \nQuickCheckThrowOnFailure \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-checkextensions.html#VerboseCheck","title":"CheckExtensions.VerboseCheck","content":"CheckExtensions.VerboseCheck \nVerboseCheck \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-checkextensions.html#VerboseCheck","title":"CheckExtensions.VerboseCheck","content":"CheckExtensions.VerboseCheck \nVerboseCheck \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-checkextensions.html#VerboseCheckThrowOnFailure","title":"CheckExtensions.VerboseCheckThrowOnFailure","content":"CheckExtensions.VerboseCheckThrowOnFailure \nVerboseCheckThrowOnFailure \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html","title":"Config","content":"Config \n\nFor configuring a run.\n \nConfig.WithArbitrary \nWithArbitrary \nConfig.WithEndSize \nWithEndSize \nConfig.WithEvery \nWithEvery \nConfig.WithEveryShrink \nWithEveryShrink \nConfig.WithMaxRejected \nWithMaxRejected \nConfig.WithMaxTest \nWithMaxTest \nConfig.WithName \nWithName \nConfig.WithParallelRunConfig \nWithParallelRunConfig \nConfig.WithQuietOnSuccess \nWithQuietOnSuccess \nConfig.WithReplay \nWithReplay \nConfig.WithRunner \nWithRunner \nConfig.WithStartSize \nWithStartSize \nConfig.Every \nEvery \nConfig.MaxTest \nMaxTest \nConfig.EveryShrink \nEveryShrink \nConfig.MaxRejected \nMaxRejected \nConfig.ArbMap \nArbMap \nConfig.Replay \nReplay \nConfig.Name \nName \nConfig.EndSize \nEndSize \nConfig.Runner \nRunner \nConfig.ParallelRunConfig \nParallelRunConfig \nConfig.QuietOnSuccess \nQuietOnSuccess \nConfig.StartSize \nStartSize \nConfig.Quick \nQuick \nConfig.Default \nDefault \nConfig.Verbose \nVerbose \nConfig.VerboseThrowOnFailure \nVerboseThrowOnFailure \nConfig.QuickThrowOnFailure \nQuickThrowOnFailure"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#WithArbitrary","title":"Config.WithArbitrary","content":"Config.WithArbitrary \nWithArbitrary \n\nReturns a new Config with specified Arbitrary\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#WithEndSize","title":"Config.WithEndSize","content":"Config.WithEndSize \nWithEndSize \n\nReturns a new Config with specified EndSize\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#WithEvery","title":"Config.WithEvery","content":"Config.WithEvery \nWithEvery \n\nReturns a new Config with specified Every function\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#WithEveryShrink","title":"Config.WithEveryShrink","content":"Config.WithEveryShrink \nWithEveryShrink \n\nReturns a new Config with specified EveryShrink function\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#WithMaxRejected","title":"Config.WithMaxRejected","content":"Config.WithMaxRejected \nWithMaxRejected \n\nReturns a new Config with specified MaxRejected\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#WithMaxTest","title":"Config.WithMaxTest","content":"Config.WithMaxTest \nWithMaxTest \n\nReturns a new Config with specified MaxTest\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#WithName","title":"Config.WithName","content":"Config.WithName \nWithName \n\nReturns a new Config with specified Name\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#WithParallelRunConfig","title":"Config.WithParallelRunConfig","content":"Config.WithParallelRunConfig \nWithParallelRunConfig \n\nReturns a new Config with specified ParallelRunConfig\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#WithQuietOnSuccess","title":"Config.WithQuietOnSuccess","content":"Config.WithQuietOnSuccess \nWithQuietOnSuccess \n\nReturns a new Config with specified QuietOnSuccess\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#WithReplay","title":"Config.WithReplay","content":"Config.WithReplay \nWithReplay \n\nReturns a new Config with specified Replay option\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#WithRunner","title":"Config.WithRunner","content":"Config.WithRunner \nWithRunner \n\nReturns a new Config with specified Runner\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#WithStartSize","title":"Config.WithStartSize","content":"Config.WithStartSize \nWithStartSize \n\nReturns a new Config with specified StartSize\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#Every","title":"Config.Every","content":"Config.Every \nEvery \n\nWhat to print when new arguments args are generated in test n\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#MaxTest","title":"Config.MaxTest","content":"Config.MaxTest \nMaxTest \n\nThe maximum number of tests that are run.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#EveryShrink","title":"Config.EveryShrink","content":"Config.EveryShrink \nEveryShrink \n\nWhat to print every time a counter-example is successfully shrunk\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#MaxRejected","title":"Config.MaxRejected","content":"Config.MaxRejected \nMaxRejected \n\nThe maximum number of tests where values are rejected, e.g. as the result of ==\u003E\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#ArbMap","title":"Config.ArbMap","content":"Config.ArbMap \nArbMap \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#Replay","title":"Config.Replay","content":"Config.Replay \nReplay \n\nIf set, the seed to use to start testing. Allows reproduction of previous runs.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#Name","title":"Config.Name","content":"Config.Name \nName \n\nName of the test.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#EndSize","title":"Config.EndSize","content":"Config.EndSize \nEndSize \n\nThe size to use for the last test, when all the tests are passing. The size increases linearly between Start- and EndSize.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#Runner","title":"Config.Runner","content":"Config.Runner \nRunner \n\nA custom test runner, e.g. to integrate with a test framework like xUnit or NUnit. \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#ParallelRunConfig","title":"Config.ParallelRunConfig","content":"Config.ParallelRunConfig \nParallelRunConfig \n\nIf set, inputs for property generation and property evaluation will be run in parallel. \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#QuietOnSuccess","title":"Config.QuietOnSuccess","content":"Config.QuietOnSuccess \nQuietOnSuccess \n\nIf set, suppresses the output from the test if the test is successful.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#StartSize","title":"Config.StartSize","content":"Config.StartSize \nStartSize \n\nThe size to use for the first test.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#Quick","title":"Config.Quick","content":"Config.Quick \nQuick \n\nThe quick configuration only prints a summary result at the end of the test.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#Default","title":"Config.Default","content":"Config.Default \nDefault \n\nThe default configuration is the quick configuration.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#Verbose","title":"Config.Verbose","content":"Config.Verbose \nVerbose \n\nThe verbose configuration prints each generated argument.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#VerboseThrowOnFailure","title":"Config.VerboseThrowOnFailure","content":"Config.VerboseThrowOnFailure \nVerboseThrowOnFailure \n\nLike the Verbose configuration, only throws an exception with the error message if the test fails or is exhausted.\nUseful for use within other unit testing frameworks that usually adopt this methodology to signal failure.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-config.html#QuickThrowOnFailure","title":"Config.QuickThrowOnFailure","content":"Config.QuickThrowOnFailure \nQuickThrowOnFailure \n\nLike the Quick configuration, only throws an exception with the error message if the test fails or is exhausted.\nUseful for use within other unit testing frameworks that usually adopt this methodology to signal failure.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-configextensions.html","title":"ConfigExtensions","content":"ConfigExtensions \n \nConfigExtensions.WithEvery \nWithEvery \nConfigExtensions.WithEveryShrink \nWithEveryShrink \nConfigExtensions.WithNoParallelRunConfig \nWithNoParallelRunConfig \nConfigExtensions.WithNoReplay \nWithNoReplay \nConfigExtensions.WithParallelRunConfig \nWithParallelRunConfig \nConfigExtensions.WithReplay \nWithReplay \nConfigExtensions.WithReplay \nWithReplay"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-configextensions.html#WithEvery","title":"ConfigExtensions.WithEvery","content":"ConfigExtensions.WithEvery \nWithEvery \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-configextensions.html#WithEveryShrink","title":"ConfigExtensions.WithEveryShrink","content":"ConfigExtensions.WithEveryShrink \nWithEveryShrink \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-configextensions.html#WithNoParallelRunConfig","title":"ConfigExtensions.WithNoParallelRunConfig","content":"ConfigExtensions.WithNoParallelRunConfig \nWithNoParallelRunConfig \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-configextensions.html#WithNoReplay","title":"ConfigExtensions.WithNoReplay","content":"ConfigExtensions.WithNoReplay \nWithNoReplay \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-configextensions.html#WithParallelRunConfig","title":"ConfigExtensions.WithParallelRunConfig","content":"ConfigExtensions.WithParallelRunConfig \nWithParallelRunConfig \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-configextensions.html#WithReplay","title":"ConfigExtensions.WithReplay","content":"ConfigExtensions.WithReplay \nWithReplay \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-configextensions.html#WithReplay","title":"ConfigExtensions.WithReplay","content":"ConfigExtensions.WithReplay \nWithReplay \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-donotshrink-1.html","title":"DoNotShrink\u003C\u0027a\u003E","content":"DoNotShrink\u003C\u0027a\u003E \n\nUse the generator for \u0027a, but don\u0027t shrink.\n \nDoNotShrink\u003C\u0027a\u003E.DoNotShrink \nDoNotShrink"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-donotshrink-1.html#DoNotShrink","title":"DoNotShrink\u003C\u0027a\u003E.DoNotShrink","content":"DoNotShrink\u003C\u0027a\u003E.DoNotShrink \nDoNotShrink \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-donotsize-1.html","title":"DoNotSize\u003C\u0027a\u003E","content":"DoNotSize\u003C\u0027a\u003E \n\nWhereas most types are restricted by a size that grows\nas the test gets further, by applying this type the underlying\ntype will ignore this size and always generate from the full range.\nNote that this only makes a difference for types that have a range -\ncurrently integer types, TimeSpan and Decimal have DoNotSize Arbitrary instances.\nThis is typically (and at least currently) only applicable for value types\nthat are comparable, hence the type constraints.\n \nDoNotSize\u003C\u0027a\u003E.Unwrap \nUnwrap \nDoNotSize\u003C\u0027a\u003E.DoNotSize \nDoNotSize"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-donotsize-1.html#Unwrap","title":"DoNotSize\u003C\u0027a\u003E.Unwrap","content":"DoNotSize\u003C\u0027a\u003E.Unwrap \nUnwrap \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-donotsize-1.html#DoNotSize","title":"DoNotSize\u003C\u0027a\u003E.DoNotSize","content":"DoNotSize\u003C\u0027a\u003E.DoNotSize \nDoNotSize \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fixedlengtharray-1.html","title":"FixedLengthArray\u003C\u0027T\u003E","content":"FixedLengthArray\u003C\u0027T\u003E \n\nRepresents an array whose length does not change when shrinking.\n \nFixedLengthArray\u003C\u0027T\u003E.Get \nGet \nFixedLengthArray\u003C\u0027T\u003E.FixedLengthArray \nFixedLengthArray"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fixedlengtharray-1.html#Get","title":"FixedLengthArray\u003C\u0027T\u003E.Get","content":"FixedLengthArray\u003C\u0027T\u003E.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fixedlengtharray-1.html#FixedLengthArray","title":"FixedLengthArray\u003C\u0027T\u003E.FixedLengthArray","content":"FixedLengthArray\u003C\u0027T\u003E.FixedLengthArray \nFixedLengthArray \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-function-2.html","title":"Function\u003C\u0027a, \u0027b\u003E","content":"Function\u003C\u0027a, \u0027b\u003E \n\nA function (F# function) that can be displayed and shrunk.\n \nFunction\u003C\u0027a, \u0027b\u003E.Value \nValue \nFunction\u003C\u0027a, \u0027b\u003E.Table \nTable \nFunction\u003C\u0027a, \u0027b\u003E.StructuredDisplayAsTable \nStructuredDisplayAsTable \nFunction\u003C\u0027a, \u0027b\u003E.From \nFrom \nFunction\u003C\u0027a, \u0027b\u003E.F \nF"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-function-2.html#Value","title":"Function\u003C\u0027a, \u0027b\u003E.Value","content":"Function\u003C\u0027a, \u0027b\u003E.Value \nValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-function-2.html#Table","title":"Function\u003C\u0027a, \u0027b\u003E.Table","content":"Function\u003C\u0027a, \u0027b\u003E.Table \nTable \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-function-2.html#StructuredDisplayAsTable","title":"Function\u003C\u0027a, \u0027b\u003E.StructuredDisplayAsTable","content":"Function\u003C\u0027a, \u0027b\u003E.StructuredDisplayAsTable \nStructuredDisplayAsTable \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-function-2.html#From","title":"Function\u003C\u0027a, \u0027b\u003E.From","content":"Function\u003C\u0027a, \u0027b\u003E.From \nFrom \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-function-2.html#F","title":"Function\u003C\u0027a, \u0027b\u003E.F","content":"Function\u003C\u0027a, \u0027b\u003E.F \nF \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-gen-1.html","title":"Gen\u003C\u0027T\u003E","content":"Gen\u003C\u0027T\u003E \n\n Generator of a random value, based on a size parameter and a randomly generated int.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-hostname.html","title":"HostName","content":"HostName \n \nHostName.HostName \nHostName"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-hostname.html#HostName","title":"HostName.HostName","content":"HostName.HostName \nHostName \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-iarbmap.html","title":"IArbMap","content":"IArbMap \n\n Maps types to Arbitrary instances for that type.\n Once constructed, the map is immutable.\n \nIArbMap.ArbFor \nArbFor \nIArbMap.ArbFor \nArbFor \nIArbMap.MergeFactory \nMergeFactory"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-iarbmap.html#ArbFor","title":"IArbMap.ArbFor","content":"IArbMap.ArbFor \nArbFor \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-iarbmap.html#ArbFor","title":"IArbMap.ArbFor","content":"IArbMap.ArbFor \nArbFor \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-iarbmap.html#MergeFactory","title":"IArbMap.MergeFactory","content":"IArbMap.MergeFactory \nMergeFactory \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-ipv4address.html","title":"IPv4Address","content":"IPv4Address \n \nIPv4Address.IPv4Address \nIPv4Address"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-ipv4address.html#IPv4Address","title":"IPv4Address.IPv4Address","content":"IPv4Address.IPv4Address \nIPv4Address \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-ipv6address.html","title":"IPv6Address","content":"IPv6Address \n \nIPv6Address.IPv6Address \nIPv6Address"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-ipv6address.html#IPv6Address","title":"IPv6Address.IPv6Address","content":"IPv6Address.IPv6Address \nIPv6Address \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-irunner.html","title":"IRunner","content":"IRunner \n\nFor implementing your own test runner.\n \nIRunner.OnArguments \nOnArguments \nIRunner.OnFinished \nOnFinished \nIRunner.OnShrink \nOnShrink \nIRunner.OnStartFixture \nOnStartFixture"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-irunner.html#OnArguments","title":"IRunner.OnArguments","content":"IRunner.OnArguments \nOnArguments \n\nCalled whenever arguments are generated and after the test is run.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-irunner.html#OnFinished","title":"IRunner.OnFinished","content":"IRunner.OnFinished \nOnFinished \n\nCalled whenever all tests are done, either Passed, Failed or Exhausted.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-irunner.html#OnShrink","title":"IRunner.OnShrink","content":"IRunner.OnShrink \nOnShrink \n\nCalled on a successful shrink.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-irunner.html#OnStartFixture","title":"IRunner.OnStartFixture","content":"IRunner.OnStartFixture \nOnStartFixture \n\nCalled before a group of properties on a type are checked.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-intwithminmax.html","title":"IntWithMinMax","content":"IntWithMinMax \n\nRepresents an int that can include int.MinValue and int.MaxValue.\n \nIntWithMinMax.Get \nGet \nIntWithMinMax.op_Explicit \nop_Explicit \nIntWithMinMax.IntWithMinMax \nIntWithMinMax"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-intwithminmax.html#Get","title":"IntWithMinMax.Get","content":"IntWithMinMax.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-intwithminmax.html#op_Explicit","title":"IntWithMinMax.op_Explicit","content":"IntWithMinMax.op_Explicit \nop_Explicit \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-intwithminmax.html#IntWithMinMax","title":"IntWithMinMax.IntWithMinMax","content":"IntWithMinMax.IntWithMinMax \nIntWithMinMax \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-interval.html","title":"Interval","content":"Interval \n\nRepresents an integer interval.\n \nInterval.Right \nRight \nInterval.Left \nLeft \nInterval.Interval \nInterval"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-interval.html#Right","title":"Interval.Right","content":"Interval.Right \nRight \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-interval.html#Left","title":"Interval.Left","content":"Interval.Left \nLeft \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-interval.html#Interval","title":"Interval.Interval","content":"Interval.Interval \nInterval \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-negativeint.html","title":"NegativeInt","content":"NegativeInt \n\nRepresents an int \u003C 0\n \nNegativeInt.Get \nGet \nNegativeInt.op_Explicit \nop_Explicit \nNegativeInt.NegativeInt \nNegativeInt"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-negativeint.html#Get","title":"NegativeInt.Get","content":"NegativeInt.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-negativeint.html#op_Explicit","title":"NegativeInt.op_Explicit","content":"NegativeInt.op_Explicit \nop_Explicit \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-negativeint.html#NegativeInt","title":"NegativeInt.NegativeInt","content":"NegativeInt.NegativeInt \nNegativeInt \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonemptyarray-1.html","title":"NonEmptyArray\u003C\u0027T\u003E","content":"NonEmptyArray\u003C\u0027T\u003E \n\nRepresents a non-empty array.\n \nNonEmptyArray\u003C\u0027T\u003E.Get \nGet \nNonEmptyArray\u003C\u0027T\u003E.NonEmptyArray \nNonEmptyArray"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonemptyarray-1.html#Get","title":"NonEmptyArray\u003C\u0027T\u003E.Get","content":"NonEmptyArray\u003C\u0027T\u003E.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonemptyarray-1.html#NonEmptyArray","title":"NonEmptyArray\u003C\u0027T\u003E.NonEmptyArray","content":"NonEmptyArray\u003C\u0027T\u003E.NonEmptyArray \nNonEmptyArray \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonemptyset-1.html","title":"NonEmptySet\u003C\u0027T\u003E","content":"NonEmptySet\u003C\u0027T\u003E \n\nRepresents a non-empty Set.\n \nNonEmptySet\u003C\u0027T\u003E.Get \nGet \nNonEmptySet\u003C\u0027T\u003E.NonEmptySet \nNonEmptySet"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonemptyset-1.html#Get","title":"NonEmptySet\u003C\u0027T\u003E.Get","content":"NonEmptySet\u003C\u0027T\u003E.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonemptyset-1.html#NonEmptySet","title":"NonEmptySet\u003C\u0027T\u003E.NonEmptySet","content":"NonEmptySet\u003C\u0027T\u003E.NonEmptySet \nNonEmptySet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonemptystring.html","title":"NonEmptyString","content":"NonEmptyString \n\nRepresents a string that is not null or empty, and does not contain any null characters (\u0027\\000\u0027)\n \nNonEmptyString.Get \nGet \nNonEmptyString.NonEmptyString \nNonEmptyString"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonemptystring.html#Get","title":"NonEmptyString.Get","content":"NonEmptyString.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonemptystring.html#NonEmptyString","title":"NonEmptyString.NonEmptyString","content":"NonEmptyString.NonEmptyString \nNonEmptyString \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonnegativeint.html","title":"NonNegativeInt","content":"NonNegativeInt \n\nRepresents an int \u003E= 0\n \nNonNegativeInt.Get \nGet \nNonNegativeInt.op_Explicit \nop_Explicit \nNonNegativeInt.NonNegativeInt \nNonNegativeInt"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonnegativeint.html#Get","title":"NonNegativeInt.Get","content":"NonNegativeInt.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonnegativeint.html#op_Explicit","title":"NonNegativeInt.op_Explicit","content":"NonNegativeInt.op_Explicit \nop_Explicit \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonnegativeint.html#NonNegativeInt","title":"NonNegativeInt.NonNegativeInt","content":"NonNegativeInt.NonNegativeInt \nNonNegativeInt \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonnull-1.html","title":"NonNull\u003C\u0027a\u003E","content":"NonNull\u003C\u0027a\u003E \n\nWrap a type in NonNull to prevent null being generated for the wrapped type.\n \nNonNull\u003C\u0027a\u003E.Get \nGet \nNonNull\u003C\u0027a\u003E.NonNull \nNonNull"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonnull-1.html#Get","title":"NonNull\u003C\u0027a\u003E.Get","content":"NonNull\u003C\u0027a\u003E.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonnull-1.html#NonNull","title":"NonNull\u003C\u0027a\u003E.NonNull","content":"NonNull\u003C\u0027a\u003E.NonNull \nNonNull \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonwhitespacestring.html","title":"NonWhiteSpaceString","content":"NonWhiteSpaceString \n \nNonWhiteSpaceString.Get \nGet \nNonWhiteSpaceString.NonWhiteSpaceString \nNonWhiteSpaceString"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonwhitespacestring.html#Get","title":"NonWhiteSpaceString.Get","content":"NonWhiteSpaceString.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonwhitespacestring.html#NonWhiteSpaceString","title":"NonWhiteSpaceString.NonWhiteSpaceString","content":"NonWhiteSpaceString.NonWhiteSpaceString \nNonWhiteSpaceString \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonzeroint.html","title":"NonZeroInt","content":"NonZeroInt \n\nRepresents an int \u003C\u003E 0\n \nNonZeroInt.Get \nGet \nNonZeroInt.op_Explicit \nop_Explicit \nNonZeroInt.NonZeroInt \nNonZeroInt"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonzeroint.html#Get","title":"NonZeroInt.Get","content":"NonZeroInt.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonzeroint.html#op_Explicit","title":"NonZeroInt.op_Explicit","content":"NonZeroInt.op_Explicit \nop_Explicit \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-nonzeroint.html#NonZeroInt","title":"NonZeroInt.NonZeroInt","content":"NonZeroInt.NonZeroInt \nNonZeroInt \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-normalfloat.html","title":"NormalFloat","content":"NormalFloat \n\nRepresents a float that is not NaN or Infinity.\n \nNormalFloat.Get \nGet \nNormalFloat.op_Explicit \nop_Explicit \nNormalFloat.NormalFloat \nNormalFloat"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-normalfloat.html#Get","title":"NormalFloat.Get","content":"NormalFloat.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-normalfloat.html#op_Explicit","title":"NormalFloat.op_Explicit","content":"NormalFloat.op_Explicit \nop_Explicit \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-normalfloat.html#NormalFloat","title":"NormalFloat.NormalFloat","content":"NormalFloat.NormalFloat \nNormalFloat \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-outcome.html","title":"Outcome","content":"Outcome \n \nOutcome.Failed \nFailed \nOutcome.Passed \nPassed \nOutcome.Rejected \nRejected"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-outcome.html#Failed","title":"Outcome.Failed","content":"Outcome.Failed \nFailed \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-outcome.html#Passed","title":"Outcome.Passed","content":"Outcome.Passed \nPassed \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-outcome.html#Rejected","title":"Outcome.Rejected","content":"Outcome.Rejected \nRejected \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-parallelrunconfig.html","title":"ParallelRunConfig","content":"ParallelRunConfig \n \nParallelRunConfig.MaxDegreeOfParallelism \nMaxDegreeOfParallelism"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-parallelrunconfig.html#MaxDegreeOfParallelism","title":"ParallelRunConfig.MaxDegreeOfParallelism","content":"ParallelRunConfig.MaxDegreeOfParallelism \nMaxDegreeOfParallelism \n\n For I/O bound work 1 would be fine, for cpu intensive tasks Environment.ProcessorCount appears to be fastest option\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-positiveint.html","title":"PositiveInt","content":"PositiveInt \n\nRepresents an int \u003E 0\n \nPositiveInt.Get \nGet \nPositiveInt.op_Explicit \nop_Explicit \nPositiveInt.PositiveInt \nPositiveInt"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-positiveint.html#Get","title":"PositiveInt.Get","content":"PositiveInt.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-positiveint.html#op_Explicit","title":"PositiveInt.op_Explicit","content":"PositiveInt.op_Explicit \nop_Explicit \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-positiveint.html#PositiveInt","title":"PositiveInt.PositiveInt","content":"PositiveInt.PositiveInt \nPositiveInt \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-property.html","title":"Property","content":"Property \n\nA Property can be checked by FsCheck.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-replay.html","title":"Replay","content":"Replay \n \nReplay.Rnd \nRnd \nReplay.Size \nSize"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-replay.html#Rnd","title":"Replay.Rnd","content":"Replay.Rnd \nRnd \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-replay.html#Size","title":"Replay.Size","content":"Replay.Size \nSize \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-result.html","title":"Result","content":"Result \n\nThe result of one execution of a property.\n \nResult.Outcome \nOutcome \nResult.Stamp \nStamp \nResult.Labels \nLabels \nResult.Arguments \nArguments"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-result.html#Outcome","title":"Result.Outcome","content":"Result.Outcome \nOutcome \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-result.html#Stamp","title":"Result.Stamp","content":"Result.Stamp \nStamp \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-result.html#Labels","title":"Result.Labels","content":"Result.Labels \nLabels \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-result.html#Arguments","title":"Result.Arguments","content":"Result.Arguments \nArguments \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-resultcontainer.html","title":"ResultContainer","content":"ResultContainer \n \nResultContainer.( \u0026\u0026\u0026 ) \n( \u0026\u0026\u0026 ) \nResultContainer.( ||| ) \n( ||| ) \nResultContainer.Value \nValue \nResultContainer.Future \nFuture"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-resultcontainer.html#( \u0026\u0026\u0026 )","title":"ResultContainer.( \u0026\u0026\u0026 )","content":"ResultContainer.( \u0026\u0026\u0026 ) \n( \u0026\u0026\u0026 ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-resultcontainer.html#( ||| )","title":"ResultContainer.( ||| )","content":"ResultContainer.( ||| ) \n( ||| ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-resultcontainer.html#Value","title":"ResultContainer.Value","content":"ResultContainer.Value \nValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-resultcontainer.html#Future","title":"ResultContainer.Future","content":"ResultContainer.Future \nFuture \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-rnd.html","title":"Rnd","content":"Rnd \n \nRnd.( .ctor ) \n( .ctor ) \nRnd.( .ctor ) \n( .ctor ) \nRnd.Seed \nSeed \nRnd.Gamma \nGamma"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-rnd.html#( .ctor )","title":"Rnd.( .ctor )","content":"Rnd.( .ctor ) \n( .ctor ) \n\n Create a new Rnd value with the specified seed value and the \u0027golden\u0027 gamma.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-rnd.html#( .ctor )","title":"Rnd.( .ctor )","content":"Rnd.( .ctor ) \n( .ctor ) \n\n Create a new random number generator with the given seed and gamma.\n Useful to faithfully reproduce a sequence or part of it. gamma must be odd,\n or this throws invalid argument exception. For good pseudo-random properties,\n please only use seeds and gamma that were generated as part of a sequence\n started with the default create function.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-rnd.html#Seed","title":"Rnd.Seed","content":"Rnd.Seed \nSeed \n\n Seed value for the random number generator.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-rnd.html#Gamma","title":"Rnd.Gamma","content":"Rnd.Gamma \nGamma \n\n An odd integer\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-stringnonullchar.html","title":"StringNoNullChar","content":"StringNoNullChar \n\nRepresents a string that does not contain null characters (\u0027\\000\u0027)\n \nStringNoNullChar.Get \nGet \nStringNoNullChar.StringNoNullChar \nStringNoNullChar"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-stringnonullchar.html#Get","title":"StringNoNullChar.Get","content":"StringNoNullChar.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-stringnonullchar.html#StringNoNullChar","title":"StringNoNullChar.StringNoNullChar","content":"StringNoNullChar.StringNoNullChar \nStringNoNullChar \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-testdata.html","title":"TestData","content":"TestData \n \nTestData.NumberOfTests \nNumberOfTests \nTestData.NumberOfShrinks \nNumberOfShrinks \nTestData.Stamps \nStamps \nTestData.Labels \nLabels"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-testdata.html#NumberOfTests","title":"TestData.NumberOfTests","content":"TestData.NumberOfTests \nNumberOfTests \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-testdata.html#NumberOfShrinks","title":"TestData.NumberOfShrinks","content":"TestData.NumberOfShrinks \nNumberOfShrinks \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-testdata.html#Stamps","title":"TestData.Stamps","content":"TestData.Stamps \nStamps \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-testdata.html#Labels","title":"TestData.Labels","content":"TestData.Labels \nLabels \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-testresult.html","title":"TestResult","content":"TestResult \n \nTestResult.Passed \nPassed \nTestResult.Failed \nFailed \nTestResult.Exhausted \nExhausted"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-testresult.html#Passed","title":"TestResult.Passed","content":"TestResult.Passed \nPassed \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-testresult.html#Failed","title":"TestResult.Failed","content":"TestResult.Failed \nFailed \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-testresult.html#Exhausted","title":"TestResult.Exhausted","content":"TestResult.Exhausted \nExhausted \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-throwingfunction-2.html","title":"ThrowingFunction\u003C\u0027a, \u0027b\u003E","content":"ThrowingFunction\u003C\u0027a, \u0027b\u003E \n \nThrowingFunction\u003C\u0027a, \u0027b\u003E.Get \nGet \nThrowingFunction\u003C\u0027a, \u0027b\u003E.ThrowingFunction \nThrowingFunction"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-throwingfunction-2.html#Get","title":"ThrowingFunction\u003C\u0027a, \u0027b\u003E.Get","content":"ThrowingFunction\u003C\u0027a, \u0027b\u003E.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-throwingfunction-2.html#ThrowingFunction","title":"ThrowingFunction\u003C\u0027a, \u0027b\u003E.ThrowingFunction","content":"ThrowingFunction\u003C\u0027a, \u0027b\u003E.ThrowingFunction \nThrowingFunction \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-unicodechar.html","title":"UnicodeChar","content":"UnicodeChar \n\nRepresents a unicode char.\n \nUnicodeChar.Get \nGet \nUnicodeChar.op_Explicit \nop_Explicit \nUnicodeChar.UnicodeChar \nUnicodeChar"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-unicodechar.html#Get","title":"UnicodeChar.Get","content":"UnicodeChar.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-unicodechar.html#op_Explicit","title":"UnicodeChar.op_Explicit","content":"UnicodeChar.op_Explicit \nop_Explicit \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-unicodechar.html#UnicodeChar","title":"UnicodeChar.UnicodeChar","content":"UnicodeChar.UnicodeChar \nUnicodeChar \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-unicodestring.html","title":"UnicodeString","content":"UnicodeString \n\nRepresents a string that can contain unicode characters.\n \nUnicodeString.Get \nGet \nUnicodeString.UnicodeString \nUnicodeString"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-unicodestring.html#Get","title":"UnicodeString.Get","content":"UnicodeString.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-unicodestring.html#UnicodeString","title":"UnicodeString.UnicodeString","content":"UnicodeString.UnicodeString \nUnicodeString \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-xmlencodedstring.html","title":"XmlEncodedString","content":"XmlEncodedString \n\nRepresents a string that can be serializable as a XML value.\n \nXmlEncodedString.Get \nGet \nXmlEncodedString.XmlEncodedString \nXmlEncodedString"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-xmlencodedstring.html#Get","title":"XmlEncodedString.Get","content":"XmlEncodedString.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-xmlencodedstring.html#XmlEncodedString","title":"XmlEncodedString.XmlEncodedString","content":"XmlEncodedString.XmlEncodedString \nXmlEncodedString \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachine.html","title":"StateMachine","content":"StateMachine \n \nStateMachine.setup \nsetup \nStateMachine.setupFunc \nsetupFunc \nStateMachine.tearDown \ntearDown \nStateMachine.tearDownAction \ntearDownAction \nStateMachine.operationWithPrecondition \noperationWithPrecondition \nStateMachine.operation \noperation \nStateMachine.operationProp \noperationProp \nStateMachine.operationBool \noperationBool \nStateMachine.operationAction \noperationAction \nStateMachine.generate \ngenerate \nStateMachine.shrink \nshrink \nStateMachine.forOne \nforOne \nStateMachine.forAll \nforAll \nStateMachine.toProperty \ntoProperty"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachine.html#setup","title":"StateMachine.setup","content":"StateMachine.setup \nsetup \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachine.html#setupFunc","title":"StateMachine.setupFunc","content":"StateMachine.setupFunc \nsetupFunc \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachine.html#tearDown","title":"StateMachine.tearDown","content":"StateMachine.tearDown \ntearDown \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachine.html#tearDownAction","title":"StateMachine.tearDownAction","content":"StateMachine.tearDownAction \ntearDownAction \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachine.html#operationWithPrecondition","title":"StateMachine.operationWithPrecondition","content":"StateMachine.operationWithPrecondition \noperationWithPrecondition \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachine.html#operation","title":"StateMachine.operation","content":"StateMachine.operation \noperation \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachine.html#operationProp","title":"StateMachine.operationProp","content":"StateMachine.operationProp \noperationProp \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachine.html#operationBool","title":"StateMachine.operationBool","content":"StateMachine.operationBool \noperationBool \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachine.html#operationAction","title":"StateMachine.operationAction","content":"StateMachine.operationAction \noperationAction \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachine.html#generate","title":"StateMachine.generate","content":"StateMachine.generate \ngenerate \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachine.html#shrink","title":"StateMachine.shrink","content":"StateMachine.shrink \nshrink \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachine.html#forOne","title":"StateMachine.forOne","content":"StateMachine.forOne \nforOne \n\n Check one run, i.e. create a property from a single run.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachine.html#forAll","title":"StateMachine.forAll","content":"StateMachine.forAll \nforAll \n\nCheck all generated runs, i.e. create a property from an arbitrarily generated run.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachine.html#toProperty","title":"StateMachine.toProperty","content":"StateMachine.toProperty \ntoProperty \n\nTurn a machine specification into a property.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-disposecall-1.html","title":"DisposeCall\u003C\u0027Actual\u003E","content":"DisposeCall\u003C\u0027Actual\u003E \n \nDisposeCall\u003C\u0027Actual\u003E.( .ctor ) \n( .ctor )"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-disposecall-1.html#( .ctor )","title":"DisposeCall\u003C\u0027Actual\u003E.( .ctor )","content":"DisposeCall\u003C\u0027Actual\u003E.( .ctor ) \n( .ctor ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-ioperation.html","title":"IOperation","content":"IOperation \n \nIOperation.ClearDependencies \nClearDependencies \nIOperation.Gets \nGets \nIOperation.Sets \nSets \nIOperation.Needs \nNeeds \nIOperation.Provides \nProvides"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-ioperation.html#ClearDependencies","title":"IOperation.ClearDependencies","content":"IOperation.ClearDependencies \nClearDependencies \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-ioperation.html#Gets","title":"IOperation.Gets","content":"IOperation.Gets \nGets \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-ioperation.html#Sets","title":"IOperation.Sets","content":"IOperation.Sets \nSets \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-ioperation.html#Needs","title":"IOperation.Needs","content":"IOperation.Needs \nNeeds \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-ioperation.html#Provides","title":"IOperation.Provides","content":"IOperation.Provides \nProvides \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-ioperationresult.html","title":"IOperationResult","content":"IOperationResult \n \nIOperationResult.Reset \nReset"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-ioperationresult.html#Reset","title":"IOperationResult.Reset","content":"IOperationResult.Reset \nReset \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-machine-2.html","title":"Machine\u003C\u0027Actual, \u0027Model\u003E","content":"Machine\u003C\u0027Actual, \u0027Model\u003E \n\nDefines the initial state for actual and model object, and allows to define the generator to use\nfor the next state, based on the model.\n \nMachine\u003C\u0027Actual, \u0027Model\u003E.( .ctor ) \n( .ctor ) \nMachine\u003C\u0027Actual, \u0027Model\u003E.( .ctor ) \n( .ctor ) \nMachine\u003C\u0027Actual, \u0027Model\u003E.Next \nNext \nMachine\u003C\u0027Actual, \u0027Model\u003E.ShrinkOperations \nShrinkOperations \nMachine\u003C\u0027Actual, \u0027Model\u003E.MaxNumberOfCommands \nMaxNumberOfCommands \nMachine\u003C\u0027Actual, \u0027Model\u003E.Setup \nSetup \nMachine\u003C\u0027Actual, \u0027Model\u003E.TearDown \nTearDown"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-machine-2.html#( .ctor )","title":"Machine\u003C\u0027Actual, \u0027Model\u003E.( .ctor )","content":"Machine\u003C\u0027Actual, \u0027Model\u003E.( .ctor ) \n( .ctor ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-machine-2.html#( .ctor )","title":"Machine\u003C\u0027Actual, \u0027Model\u003E.( .ctor )","content":"Machine\u003C\u0027Actual, \u0027Model\u003E.( .ctor ) \n( .ctor ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-machine-2.html#Next","title":"Machine\u003C\u0027Actual, \u0027Model\u003E.Next","content":"Machine\u003C\u0027Actual, \u0027Model\u003E.Next \nNext \n\nGenerate a number of possible commands based on the current state of the model. \nPreconditions are still checked, so even if a Command is returned, it is not chosen\nif its precondition does not hold.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-machine-2.html#ShrinkOperations","title":"Machine\u003C\u0027Actual, \u0027Model\u003E.ShrinkOperations","content":"Machine\u003C\u0027Actual, \u0027Model\u003E.ShrinkOperations \nShrinkOperations \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-machine-2.html#MaxNumberOfCommands","title":"Machine\u003C\u0027Actual, \u0027Model\u003E.MaxNumberOfCommands","content":"Machine\u003C\u0027Actual, \u0027Model\u003E.MaxNumberOfCommands \nMaxNumberOfCommands \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-machine-2.html#Setup","title":"Machine\u003C\u0027Actual, \u0027Model\u003E.Setup","content":"Machine\u003C\u0027Actual, \u0027Model\u003E.Setup \nSetup \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-machine-2.html#TearDown","title":"Machine\u003C\u0027Actual, \u0027Model\u003E.TearDown","content":"Machine\u003C\u0027Actual, \u0027Model\u003E.TearDown \nTearDown \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-machinerun-2.html","title":"MachineRun\u003C\u0027Actual, \u0027Model\u003E","content":"MachineRun\u003C\u0027Actual, \u0027Model\u003E \n \nMachineRun\u003C\u0027Actual, \u0027Model\u003E.StructuredToString \nStructuredToString \nMachineRun\u003C\u0027Actual, \u0027Model\u003E.Setup \nSetup \nMachineRun\u003C\u0027Actual, \u0027Model\u003E.Operations \nOperations \nMachineRun\u003C\u0027Actual, \u0027Model\u003E.TearDown \nTearDown \nMachineRun\u003C\u0027Actual, \u0027Model\u003E.UsedSize \nUsedSize"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-machinerun-2.html#StructuredToString","title":"MachineRun\u003C\u0027Actual, \u0027Model\u003E.StructuredToString","content":"MachineRun\u003C\u0027Actual, \u0027Model\u003E.StructuredToString \nStructuredToString \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-machinerun-2.html#Setup","title":"MachineRun\u003C\u0027Actual, \u0027Model\u003E.Setup","content":"MachineRun\u003C\u0027Actual, \u0027Model\u003E.Setup \nSetup \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-machinerun-2.html#Operations","title":"MachineRun\u003C\u0027Actual, \u0027Model\u003E.Operations","content":"MachineRun\u003C\u0027Actual, \u0027Model\u003E.Operations \nOperations \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-machinerun-2.html#TearDown","title":"MachineRun\u003C\u0027Actual, \u0027Model\u003E.TearDown","content":"MachineRun\u003C\u0027Actual, \u0027Model\u003E.TearDown \nTearDown \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-machinerun-2.html#UsedSize","title":"MachineRun\u003C\u0027Actual, \u0027Model\u003E.UsedSize","content":"MachineRun\u003C\u0027Actual, \u0027Model\u003E.UsedSize \nUsedSize \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-methodcall-1.html","title":"MethodCall\u003C\u0027Actual\u003E","content":"MethodCall\u003C\u0027Actual\u003E \n \nMethodCall\u003C\u0027Actual\u003E.( .ctor ) \n( .ctor )"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-methodcall-1.html#( .ctor )","title":"MethodCall\u003C\u0027Actual\u003E.( .ctor )","content":"MethodCall\u003C\u0027Actual\u003E.( .ctor ) \n( .ctor ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-new-1.html","title":"New\u003C\u0027Actual\u003E","content":"New\u003C\u0027Actual\u003E \n \nNew\u003C\u0027Actual\u003E.( .ctor ) \n( .ctor )"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-new-1.html#( .ctor )","title":"New\u003C\u0027Actual\u003E.( .ctor )","content":"New\u003C\u0027Actual\u003E.( .ctor ) \n( .ctor ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-objectmachine-1.html","title":"ObjectMachine\u003C\u0027Actual\u003E","content":"ObjectMachine\u003C\u0027Actual\u003E \n \nObjectMachine\u003C\u0027Actual\u003E.( .ctor ) \n( .ctor )"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-objectmachine-1.html#( .ctor )","title":"ObjectMachine\u003C\u0027Actual\u003E.( .ctor )","content":"ObjectMachine\u003C\u0027Actual\u003E.( .ctor ) \n( .ctor ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-objectmachinemodel.html","title":"ObjectMachineModel","content":"ObjectMachineModel \n \nObjectMachineModel.Item1 \nItem1 \nObjectMachineModel.Item2 \nItem2 \nObjectMachineModel.Item3 \nItem3"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-objectmachinemodel.html#Item1","title":"ObjectMachineModel.Item1","content":"ObjectMachineModel.Item1 \nItem1 \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-objectmachinemodel.html#Item2","title":"ObjectMachineModel.Item2","content":"ObjectMachineModel.Item2 \nItem2 \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-objectmachinemodel.html#Item3","title":"ObjectMachineModel.Item3","content":"ObjectMachineModel.Item3 \nItem3 \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-operation-2.html","title":"Operation\u003C\u0027Actual, \u0027Model\u003E","content":"Operation\u003C\u0027Actual, \u0027Model\u003E \n\nAn operation describes pre and post conditions and the model for a single operation under test.\nThe post-conditions are the invariants that will be checked; when these do not hold the test fails.\n \nOperation\u003C\u0027Actual, \u0027Model\u003E.( .ctor ) \n( .ctor ) \nOperation\u003C\u0027Actual, \u0027Model\u003E.Check \nCheck \nOperation\u003C\u0027Actual, \u0027Model\u003E.Pre \nPre \nOperation\u003C\u0027Actual, \u0027Model\u003E.Run \nRun"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-operation-2.html#( .ctor )","title":"Operation\u003C\u0027Actual, \u0027Model\u003E.( .ctor )","content":"Operation\u003C\u0027Actual, \u0027Model\u003E.( .ctor ) \n( .ctor ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-operation-2.html#Check","title":"Operation\u003C\u0027Actual, \u0027Model\u003E.Check","content":"Operation\u003C\u0027Actual, \u0027Model\u003E.Check \nCheck \n\nExecutes the command on the object under test, and returns a property that must hold.\nThis property typically compares the state of the model with the state of the object after\nexecution of the command.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-operation-2.html#Pre","title":"Operation\u003C\u0027Actual, \u0027Model\u003E.Pre","content":"Operation\u003C\u0027Actual, \u0027Model\u003E.Pre \nPre \n\nOptional precondition for execution of the command. When this does not hold, the test continues\nbut the command is not executed.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-operation-2.html#Run","title":"Operation\u003C\u0027Actual, \u0027Model\u003E.Run","content":"Operation\u003C\u0027Actual, \u0027Model\u003E.Run \nRun \n\nExecutes the command on the model of the object.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-operationresult-1.html","title":"OperationResult\u003C\u0027a\u003E","content":"OperationResult\u003C\u0027a\u003E \n \nOperationResult\u003C\u0027a\u003E.( .ctor ) \n( .ctor ) \nOperationResult\u003C\u0027a\u003E.V \nV \nOperationResult\u003C\u0027a\u003E.Counter \nCounter"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-operationresult-1.html#( .ctor )","title":"OperationResult\u003C\u0027a\u003E.( .ctor )","content":"OperationResult\u003C\u0027a\u003E.( .ctor ) \n( .ctor ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-operationresult-1.html#V","title":"OperationResult\u003C\u0027a\u003E.V","content":"OperationResult\u003C\u0027a\u003E.V \nV \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-operationresult-1.html#Counter","title":"OperationResult\u003C\u0027a\u003E.Counter","content":"OperationResult\u003C\u0027a\u003E.Counter \nCounter \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-setup-2.html","title":"Setup\u003C\u0027Actual, \u0027Model\u003E","content":"Setup\u003C\u0027Actual, \u0027Model\u003E \n \nSetup\u003C\u0027Actual, \u0027Model\u003E.( .ctor ) \n( .ctor ) \nSetup\u003C\u0027Actual, \u0027Model\u003E.Actual \nActual \nSetup\u003C\u0027Actual, \u0027Model\u003E.Model \nModel"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-setup-2.html#( .ctor )","title":"Setup\u003C\u0027Actual, \u0027Model\u003E.( .ctor )","content":"Setup\u003C\u0027Actual, \u0027Model\u003E.( .ctor ) \n( .ctor ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-setup-2.html#Actual","title":"Setup\u003C\u0027Actual, \u0027Model\u003E.Actual","content":"Setup\u003C\u0027Actual, \u0027Model\u003E.Actual \nActual \n\nRandomly generate the initial state of the actual object. Should still correspond to the \ninitial state of model object; so you should only randomly generate parameters to the instance\nthat don\u0027t affect the model.\nNote:make sure that each value is truly a new instance if the commands change the state\nof the object. Gen.connstant in particular is a bad idea - use Gen.fresh instead.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-setup-2.html#Model","title":"Setup\u003C\u0027Actual, \u0027Model\u003E.Model","content":"Setup\u003C\u0027Actual, \u0027Model\u003E.Model \nModel \n\nInitial state of model object. Must correspond to initial state of actual object.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachineextensions.html","title":"StateMachineExtensions","content":"StateMachineExtensions \n \nStateMachineExtensions.ToProperty \nToProperty \nStateMachineExtensions.ToProperty \nToProperty \nStateMachineExtensions.ToProperty \nToProperty"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachineextensions.html#ToProperty","title":"StateMachineExtensions.ToProperty","content":"StateMachineExtensions.ToProperty \nToProperty \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachineextensions.html#ToProperty","title":"StateMachineExtensions.ToProperty","content":"StateMachineExtensions.ToProperty \nToProperty \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-statemachineextensions.html#ToProperty","title":"StateMachineExtensions.ToProperty","content":"StateMachineExtensions.ToProperty \nToProperty \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-stopoperation-2.html","title":"StopOperation\u003C\u0027Actual, \u0027Model\u003E","content":"StopOperation\u003C\u0027Actual, \u0027Model\u003E \n \nStopOperation\u003C\u0027Actual, \u0027Model\u003E.( .ctor ) \n( .ctor )"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-stopoperation-2.html#( .ctor )","title":"StopOperation\u003C\u0027Actual, \u0027Model\u003E.( .ctor )","content":"StopOperation\u003C\u0027Actual, \u0027Model\u003E.( .ctor ) \n( .ctor ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-teardown-1.html","title":"TearDown\u003C\u0027Actual\u003E","content":"TearDown\u003C\u0027Actual\u003E \n \nTearDown\u003C\u0027Actual\u003E.( .ctor ) \n( .ctor ) \nTearDown\u003C\u0027Actual\u003E.Actual \nActual"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-teardown-1.html#( .ctor )","title":"TearDown\u003C\u0027Actual\u003E.( .ctor )","content":"TearDown\u003C\u0027Actual\u003E.( .ctor ) \n( .ctor ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-experimental-teardown-1.html#Actual","title":"TearDown\u003C\u0027Actual\u003E.Actual","content":"TearDown\u003C\u0027Actual\u003E.Actual \nActual \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html","title":"Arb","content":"Arb \n \nArb.toGen \ntoGen \nArb.toShrink \ntoShrink \nArb.fromGen \nfromGen \nArb.fromGenShrink \nfromGenShrink \nArb.convert \nconvert \nArb.filter \nfilter \nArb.mapFilter \nmapFilter \nArb.zip \nzip \nArb.array \narray \nArb.option \noption \nArb.nullable \nnullable \nArb.list \nlist \nArb.pureFunction \npureFunction \nArb.throwingFunction \nthrowingFunction \nArb.set \nset \nArb.mapKV \nmapKV"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html#toGen","title":"Arb.toGen","content":"Arb.toGen \ntoGen \n\n Get the Gen from the given Arbitary.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html#toShrink","title":"Arb.toShrink","content":"Arb.toShrink \ntoShrink \n\n Get the shrinker function from the given Arbitrary.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html#fromGen","title":"Arb.fromGen","content":"Arb.fromGen \nfromGen \n\n Construct an Arbitrary instance from a generator.\n Shrink is not supported for this type.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html#fromGenShrink","title":"Arb.fromGenShrink","content":"Arb.fromGenShrink \nfromGenShrink \n\n Construct an Arbitrary instance from a generator and shrinker.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html#convert","title":"Arb.convert","content":"Arb.convert \nconvert \n\n Construct an Arbitrary instance for a type that can be mapped to and from another type (e.g. a wrapper),\n based on a Arbitrary instance for the source type and two mapping functions.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html#filter","title":"Arb.filter","content":"Arb.filter \nfilter \n\n Return an Arbitrary instance that is a filtered version of an existing arbitrary instance.\n The generator uses Gen.where, and the shrinks are filtered using Seq.filter with the given predicate.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html#mapFilter","title":"Arb.mapFilter","content":"Arb.mapFilter \nmapFilter \n\n Return an Arbitrary instance that is a mapped and filtered version of an existing arbitrary instance.\n The generator uses Gen.map with the given mapper and then Gen.where with the given predicate,\n and the shrinks are filtered using Seq.filter with the given predicate.\n This is sometimes useful if using just a filter would reduce the chance of getting a good value\n from the generator - and you can map the value instead. E.g. PositiveInt.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html#zip","title":"Arb.zip","content":"Arb.zip \nzip \n\n Generates 2-tuples.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html#array","title":"Arb.array","content":"Arb.array \narray \n\n Generates one-dimensional arrays. \n The length of the generated array is between 0 and size.\n The sum of the sizes of the elements is equal to the size of the generated array.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html#option","title":"Arb.option","content":"Arb.option \noption \n\n Generates option values that are None 1/8 of the time.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html#nullable","title":"Arb.nullable","content":"Arb.nullable \nnullable \n\n Generates nullable values that are null 1/8 of the time.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html#list","title":"Arb.list","content":"Arb.list \nlist \n\n Generates FSharp.Core list\u003C\u0027T\u003E values. \n The length of the generated list is between 0 and size. \n The sum of the sizes of the elements is equal to the size of the generated list.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html#pureFunction","title":"Arb.pureFunction","content":"Arb.pureFunction \npureFunction \n\n Generates pure functions that produce the given output values \u0027U. \n There is no shrinking for functions.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html#throwingFunction","title":"Arb.throwingFunction","content":"Arb.throwingFunction \nthrowingFunction \n\n Generates F# function values that generate an instance of the function result type about half the time. The other \n times it generate one of the given exceptions.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html#set","title":"Arb.set","content":"Arb.set \nset \n\n Generates Set\u003C\u0027T\u003E values.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arb.html#mapKV","title":"Arb.mapKV","content":"Arb.mapKV \nmapKV \n\n Generates Map\u003CTKey,TValue\u003E values.\n Not named \u0060map\u0060 because that has other meanings.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arbmap.html","title":"ArbMap","content":"ArbMap \n \nArbMap.defaults \ndefaults \nArbMap.mergeWithType \nmergeWithType \nArbMap.mergeWith \nmergeWith \nArbMap.mergeFactory \nmergeFactory \nArbMap.mergeArbFactory \nmergeArbFactory \nArbMap.mergeMapFactory \nmergeMapFactory \nArbMap.mergeArb \nmergeArb \nArbMap.arbitrary \narbitrary \nArbMap.generate \ngenerate"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arbmap.html#defaults","title":"ArbMap.defaults","content":"ArbMap.defaults \ndefaults \n\n The immutable default mapping from a type to Arbitrary for that type.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arbmap.html#mergeWithType","title":"ArbMap.mergeWithType","content":"ArbMap.mergeWithType \nmergeWithType \n\n Return a new Type to Arbitrary map that merges the existing map with new Arbitrary\u003C\u0027T\u003E instances\n discovered on the given Type. See mergeWith\u003C\u0027TArb\u003E for more info on what the shape of instancesType can be.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arbmap.html#mergeWith","title":"ArbMap.mergeWith","content":"ArbMap.mergeWith \nmergeWith \n\n Return a new Type to Arbitrary map that merges the existing map with new Arbitrary\u003C\u0027T\u003E instances\n discovered on the given type argument \u0027TArb.\n The new Arbitrary instances take precedence over the ones for the same type\n in the existing map.\n\n instancesType should have static methods or properties that return Arbitrary\u003C\u0027T\u003E\n instances. The methods or properties can have any name, and there can be any number of them.\n\n A method may return Arbitrary instances for generic types, e.g. Arbitrary\u003CKeyValuePair\u003C\u0027K,\u0027V\u003E\u003E.\n In that case, the implementation needs to obtain an Arbitrary\u003C\u0027Key\u003E and Arbitrary\u003C\u0027Value\u003E - it can declare\n parameters of type Arbitrary\u003C\u0027T\u003E to obtain them. Arbitrary instance of the correct type are automatically\n injected on construction of a particular type.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arbmap.html#mergeFactory","title":"ArbMap.mergeFactory","content":"ArbMap.mergeFactory \nmergeFactory \n\n Return a new Type to Arbitrary map that merges the existing map with the Arbitrary\u003C\u0027T\u003E returned by the given function.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arbmap.html#mergeArbFactory","title":"ArbMap.mergeArbFactory","content":"ArbMap.mergeArbFactory \nmergeArbFactory \n\n Return a new Type to Arbitrary map that merges the existing map with the Arbitrary\u003C\u0027T\u003E returned by the given function.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arbmap.html#mergeMapFactory","title":"ArbMap.mergeMapFactory","content":"ArbMap.mergeMapFactory \nmergeMapFactory \n\n Return a new Type to Arbitrary map that merges the existing map with the Arbitrary\u003C\u0027T\u003E returned by the given function.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arbmap.html#mergeArb","title":"ArbMap.mergeArb","content":"ArbMap.mergeArb \nmergeArb \n\n Return a new Type to Arbitrary map that merges the existing map with the provided Arbitrary\u003C\u0027T\u003E instance.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arbmap.html#arbitrary","title":"ArbMap.arbitrary","content":"ArbMap.arbitrary \narbitrary \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arbmap.html#generate","title":"ArbMap.generate","content":"ArbMap.generate \ngenerate \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arbpatterns.html","title":"ArbPatterns","content":"ArbPatterns \n \nArbPatterns.( |Fun| ) \n( |Fun| )"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-arbpatterns.html#( |Fun| )","title":"ArbPatterns.( |Fun| )","content":"ArbPatterns.( |Fun| ) \n( |Fun| ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html","title":"Gen","content":"Gen \n \nGen.constant \nconstant \nGen.map \nmap \nGen.fresh \nfresh \nGen.apply \napply \nGen.bind \nbind \nGen.map2 \nmap2 \nGen.map3 \nmap3 \nGen.map4 \nmap4 \nGen.map5 \nmap5 \nGen.map6 \nmap6 \nGen.sized \nsized \nGen.resize \nresize \nGen.scaleSize \nscaleSize \nGen.sampleWithSeed \nsampleWithSeed \nGen.sampleWithSize \nsampleWithSize \nGen.sample \nsample \nGen.choose \nchoose \nGen.choose64 \nchoose64 \nGen.elements \nelements \nGen.growingElements \ngrowingElements \nGen.oneof \noneof \nGen.frequency \nfrequency \nGen.two \ntwo \nGen.three \nthree \nGen.four \nfour \nGen.zip \nzip \nGen.zip3 \nzip3 \nGen.collectToList \ncollectToList \nGen.collectToArray \ncollectToArray \nGen.collectToSeq \ncollectToSeq \nGen.sequenceToList \nsequenceToList \nGen.sequenceToArray \nsequenceToArray \nGen.sequenceToSeq \nsequenceToSeq \nGen.tryWhere \ntryWhere \nGen.tryFilter \ntryFilter \nGen.where \nwhere \nGen.filter \nfilter \nGen.shuffle \nshuffle \nGen.piles \npiles \nGen.listOfLength \nlistOfLength \nGen.listOf \nlistOf \nGen.nonEmptyListOf \nnonEmptyListOf \nGen.arrayOfLength \narrayOfLength \nGen.arrayOf \narrayOf \nGen.array2DOfDim \narray2DOfDim \nGen.array2DOf \narray2DOf \nGen.subListOf \nsubListOf \nGen.optionOf \noptionOf"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#constant","title":"Gen.constant","content":"Gen.constant \nconstant \n\n Always generate the same given value. See also fresh.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#map","title":"Gen.map","content":"Gen.map \nmap \n\n Create a new generator by applying f to each value in the given generator.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#fresh","title":"Gen.fresh","content":"Gen.fresh \nfresh \n\n Generate fresh instances by calling create every time the generator \n generates a new value. Useful for generating new instances of mutable\n objects.\n See also constant.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#apply","title":"Gen.apply","content":"Gen.apply \napply \n\n Apply the functions f from the first generator to the values from the second generator pairwise,\n yielding a new generator that generates the results.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#bind","title":"Gen.bind","content":"Gen.bind \nbind \n\n Creates a new generator that generates values from the source generator, \n applies the function k to them, and generates values from the resulting generator.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#map2","title":"Gen.map2","content":"Gen.map2 \nmap2 \n\n Create a new generator by applying f to each value in the given generators.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#map3","title":"Gen.map3","content":"Gen.map3 \nmap3 \n\n Create a new generator by applying f to each value in the given generators.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#map4","title":"Gen.map4","content":"Gen.map4 \nmap4 \n\n Create a new generator by applying f to each value in the given generators.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#map5","title":"Gen.map5","content":"Gen.map5 \nmap5 \n\n Create a new generator by applying f to each value in the given generators.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#map6","title":"Gen.map6","content":"Gen.map6 \nmap6 \n\n Create a new generator by applying f to each value in the given generators.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#sized","title":"Gen.sized","content":"Gen.sized \nsized \n\n Obtain the current size. sized g calls g, passing it the current size as a parameter.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#resize","title":"Gen.resize","content":"Gen.resize \nresize \n\n Override the current size of the test. resize n g invokes generator g with size parameter n.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#scaleSize","title":"Gen.scaleSize","content":"Gen.scaleSize \nscaleSize \n\n Modify a size using the given function before passing it to the given Gen.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#sampleWithSeed","title":"Gen.sampleWithSeed","content":"Gen.sampleWithSeed \nsampleWithSeed \n\n Generates n values of the given size and starting with the given seed.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#sampleWithSize","title":"Gen.sampleWithSize","content":"Gen.sampleWithSize \nsampleWithSize \n\n Generates a given number of values with a new seed and a given size.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#sample","title":"Gen.sample","content":"Gen.sample \nsample \n\n Generates a given number of values with a new seed and a size of 50.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#choose","title":"Gen.choose","content":"Gen.choose \nchoose \n\n Generates ints between l and h, inclusive.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#choose64","title":"Gen.choose64","content":"Gen.choose64 \nchoose64 \n\n Generates int64 between l and h, inclusive.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#elements","title":"Gen.elements","content":"Gen.elements \nelements \n\nBuild a generator that randomly generates one of the values in the given non-empty, finite seq.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#growingElements","title":"Gen.growingElements","content":"Gen.growingElements \ngrowingElements \n\nBuild a generator that takes a non-empty sequence and randomly generates\none of the values among an initial segment of that sequence. The size of\nthis initial segment increases with the size parameter. Essentially this\ngenerator is Gen.elements but taking also the size into account.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#oneof","title":"Gen.oneof","content":"Gen.oneof \noneof \n\nBuild a generator that generates a value from one of the generators in the given non-empty seq, with\nequal probability.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#frequency","title":"Gen.frequency","content":"Gen.frequency \nfrequency \n\n Build a generator that generates a value from one of the generators in the given non-empty seq, with\n given probabilities. The sum of the probabilities must be larger than zero.\n "},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#two","title":"Gen.two","content":"Gen.two \ntwo \n\nBuild a generator that generates a 2-tuple of the values generated by the given generator.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#three","title":"Gen.three","content":"Gen.three \nthree \n\nBuild a generator that generates a 3-tuple of the values generated by the given generator.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#four","title":"Gen.four","content":"Gen.four \nfour \n\nBuild a generator that generates a 4-tuple of the values generated by the given generator.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#zip","title":"Gen.zip","content":"Gen.zip \nzip \n\nCombine two generators into a generator of pairs.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#zip3","title":"Gen.zip3","content":"Gen.zip3 \nzip3 \n\nCombine three generators into a generator of 3-tuples.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#collectToList","title":"Gen.collectToList","content":"Gen.collectToList \ncollectToList \n\n Traverse the given enumerable into a generator of a list using the specified binder function to create generators.\n[category: Create generators from generators]\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#collectToArray","title":"Gen.collectToArray","content":"Gen.collectToArray \ncollectToArray \n\n Traverse the given array into a generator of an array using the specified binder function to create generators.\n[category: Creating generators from generators]\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#collectToSeq","title":"Gen.collectToSeq","content":"Gen.collectToSeq \ncollectToSeq \n\n Traverse the given enumerable into a generator of an enumerable using the specified binder function to create generators.\n Each seq generated by the resulting generator can be infinite, if the source seq is infinite.\n[category: Create generators from generators]\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#sequenceToList","title":"Gen.sequenceToList","content":"Gen.sequenceToList \nsequenceToList \n\n Sequence the given enumerable of generators into a generator of a list.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#sequenceToArray","title":"Gen.sequenceToArray","content":"Gen.sequenceToArray \nsequenceToArray \n\n Sequence the given array of generators into a generator of an array.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#sequenceToSeq","title":"Gen.sequenceToSeq","content":"Gen.sequenceToSeq \nsequenceToSeq \n\n Sequence the given seq of generators into a generator of a seq.\n Each seq generated by the resulting generator can be infinite, if the source seq is infinite.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#tryWhere","title":"Gen.tryWhere","content":"Gen.tryWhere \ntryWhere \n\nTries to generate a value that satisfies a predicate. This function \u0027gives up\u0027 by generating None\nif the given original generator did not generate any values that satisfied the predicate, after trying to\nget values by increasing its size.\n\nThe \u0060tryWhere\u0060 function is also aliased as \u0060tryFilter\u0060. These two functions are identical, but co-exist\nso that you can choose the word that makes your code most readable in your given context.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#tryFilter","title":"Gen.tryFilter","content":"Gen.tryFilter \ntryFilter \n\nTries to generate a value that satisfies a predicate. This function \u0027gives up\u0027 by generating None\nif the given original generator did not generate any values that satisfied the predicate, after trying to\nget values by increasing its size.\n\nThe \u0060tryFilter\u0060 function is an alias for the \u0060tryWhere\u0060 function. These two functions are identical, but co-exist\nso that you can choose the word that makes your code most readable in your given context.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#where","title":"Gen.where","content":"Gen.where \nwhere \n\nGenerates a value that satisfies a predicate. Contrary to tryWhere, this function keeps re-trying\nby increasing the size of the original generator ad infinitum. Make sure there is a high probability that \nthe predicate is satisfied.\n\nThe \u0060where\u0060 function is also aliased as \u0060filter\u0060. These two functions are identical, but co-exist\nso that you can choose the word that makes your code most readable in your given context.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#filter","title":"Gen.filter","content":"Gen.filter \nfilter \n\nGenerates a value that satisfies a predicate. Contrary to tryFilter, this function keeps re-trying\nby increasing the size of the original generator ad infinitum. Make sure there is a high probability that \nthe predicate is satisfied.\n\nThe \u0060filter\u0060 function is an alias for the \u0060where\u0060 function. These two functions are identical, but co-exist\nso that you can choose the word that makes your code most readable in your given context.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#shuffle","title":"Gen.shuffle","content":"Gen.shuffle \nshuffle \n\nGenerates random permutations of the given sequence.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#piles","title":"Gen.piles","content":"Gen.piles \npiles \n\n Generates random arrays of given length where the sum of\n all elements equals the given sum.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#listOfLength","title":"Gen.listOfLength","content":"Gen.listOfLength \nlistOfLength \n\n Generates lists of given length, containing values generated by the given generator.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#listOf","title":"Gen.listOf","content":"Gen.listOf \nlistOf \n\n Generates lists of random lengths between zero and size.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#nonEmptyListOf","title":"Gen.nonEmptyListOf","content":"Gen.nonEmptyListOf \nnonEmptyListOf \n\n Generates non-empty lists of random lengths between zero and size.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#arrayOfLength","title":"Gen.arrayOfLength","content":"Gen.arrayOfLength \narrayOfLength \n\n Generates arrays of given length, containing values generated by the given generator.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#arrayOf","title":"Gen.arrayOf","content":"Gen.arrayOf \narrayOf \n\n Generates arrays of random length between zero and size.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#array2DOfDim","title":"Gen.array2DOfDim","content":"Gen.array2DOfDim \narray2DOfDim \n\n Generates 2D arrays of the given dimensions.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#array2DOf","title":"Gen.array2DOf","content":"Gen.array2DOf \narray2DOf \n\n Generates a 2D array. The square root of the size is the maximum number of rows and columns.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#subListOf","title":"Gen.subListOf","content":"Gen.subListOf \nsubListOf \n\n Generates sublists of the given seq. For a given list of length n,\n each sublist has between 0 and n elements, and the order of the \n elements is the same as in the given seq.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-gen.html#optionOf","title":"Gen.optionOf","content":"Gen.optionOf \noptionOf \n\nGenerates option values that are \u0027None\u0027 1/8 of the time.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder.html","title":"GenBuilder","content":"GenBuilder \n \nGenBuilder.GenBuilder \nGenBuilder \nGenBuilder.gen \ngen"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder.html#gen","title":"GenBuilder.gen","content":"GenBuilder.gen \ngen \n\n The computation expressions for generators: gen { ... }\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html","title":"GenBuilder","content":"GenBuilder \n\n The computation expression type for generators.\n \nGenBuilder.Bind \nBind \nGenBuilder.Bind2 \nBind2 \nGenBuilder.Bind2Return \nBind2Return \nGenBuilder.Bind3 \nBind3 \nGenBuilder.Bind3Return \nBind3Return \nGenBuilder.BindReturn \nBindReturn \nGenBuilder.Combine \nCombine \nGenBuilder.Delay \nDelay \nGenBuilder.For \nFor \nGenBuilder.MergeSources \nMergeSources \nGenBuilder.MergeSources3 \nMergeSources3 \nGenBuilder.Return \nReturn \nGenBuilder.ReturnFrom \nReturnFrom \nGenBuilder.TryFinally \nTryFinally \nGenBuilder.TryWith \nTryWith \nGenBuilder.Using \nUsing \nGenBuilder.While \nWhile \nGenBuilder.Zero \nZero"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#Bind","title":"GenBuilder.Bind","content":"GenBuilder.Bind \nBind \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#Bind2","title":"GenBuilder.Bind2","content":"GenBuilder.Bind2 \nBind2 \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#Bind2Return","title":"GenBuilder.Bind2Return","content":"GenBuilder.Bind2Return \nBind2Return \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#Bind3","title":"GenBuilder.Bind3","content":"GenBuilder.Bind3 \nBind3 \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#Bind3Return","title":"GenBuilder.Bind3Return","content":"GenBuilder.Bind3Return \nBind3Return \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#BindReturn","title":"GenBuilder.BindReturn","content":"GenBuilder.BindReturn \nBindReturn \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#Combine","title":"GenBuilder.Combine","content":"GenBuilder.Combine \nCombine \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#Delay","title":"GenBuilder.Delay","content":"GenBuilder.Delay \nDelay \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#For","title":"GenBuilder.For","content":"GenBuilder.For \nFor \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#MergeSources","title":"GenBuilder.MergeSources","content":"GenBuilder.MergeSources \nMergeSources \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#MergeSources3","title":"GenBuilder.MergeSources3","content":"GenBuilder.MergeSources3 \nMergeSources3 \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#Return","title":"GenBuilder.Return","content":"GenBuilder.Return \nReturn \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#ReturnFrom","title":"GenBuilder.ReturnFrom","content":"GenBuilder.ReturnFrom \nReturnFrom \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#TryFinally","title":"GenBuilder.TryFinally","content":"GenBuilder.TryFinally \nTryFinally \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#TryWith","title":"GenBuilder.TryWith","content":"GenBuilder.TryWith \nTryWith \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#Using","title":"GenBuilder.Using","content":"GenBuilder.Using \nUsing \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#While","title":"GenBuilder.While","content":"GenBuilder.While \nWhile \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genbuilder-genbuilder.html#Zero","title":"GenBuilder.Zero","content":"GenBuilder.Zero \nZero \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genoperators.html","title":"GenOperators","content":"GenOperators \n \nGenOperators.( \u003C!\u003E ) \n( \u003C!\u003E ) \nGenOperators.( \u003C*\u003E ) \n( \u003C*\u003E ) \nGenOperators.( \u003E\u003E= ) \n( \u003E\u003E= )"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genoperators.html#( \u003C!\u003E )","title":"GenOperators.( \u003C!\u003E )","content":"GenOperators.( \u003C!\u003E ) \n( \u003C!\u003E ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genoperators.html#( \u003C*\u003E )","title":"GenOperators.( \u003C*\u003E )","content":"GenOperators.( \u003C*\u003E ) \n( \u003C*\u003E ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-genoperators.html#( \u003E\u003E= )","title":"GenOperators.( \u003E\u003E= )","content":"GenOperators.( \u003E\u003E= ) \n( \u003E\u003E= ) \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-prop.html","title":"Prop","content":"Prop \n\nCombinators to build properties, which define the property to be tested, with some\nconvenience methods to investigate the generated arguments and any found counter-examples.\n \nProp.forAll \nforAll \nProp.given \ngiven \nProp.filter \nfilter \nProp.throws \nthrows \nProp.classify \nclassify \nProp.trivial \ntrivial \nProp.collect \ncollect \nProp.label \nlabel \nProp.ofTestable \nofTestable \nProp.discard \ndiscard"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-prop.html#forAll","title":"Prop.forAll","content":"Prop.forAll \nforAll \n\nQuantified property combinator. Provide a custom test data generator to a property.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-prop.html#given","title":"Prop.given","content":"Prop.given \ngiven \n\nDepending on the condition, return the first testable if true and the second if false.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-prop.html#filter","title":"Prop.filter","content":"Prop.filter \nfilter \n\nConditional property combinator. Resulting property holds if the given property holds whenever the condition does. See also operator: \u0027assertion ==\u003E property\u0027\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-prop.html#throws","title":"Prop.throws","content":"Prop.throws \nthrows \n\nExpect exception \u0027t when executing p. So, results in success if an exception of the given type is thrown, \nand a failure otherwise.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-prop.html#classify","title":"Prop.classify","content":"Prop.classify \nclassify \n\nClassify test cases. Test cases satisfying the condition are assigned the classification given.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-prop.html#trivial","title":"Prop.trivial","content":"Prop.trivial \ntrivial \n\nCount trivial cases. Test cases for which the condition is True are classified as trivial.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-prop.html#collect","title":"Prop.collect","content":"Prop.collect \ncollect \n\nCollect data values. The argument of collect is evaluated in each test case, \nand the distribution of values is reported, using sprintf \u0022%A\u0022.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-prop.html#label","title":"Prop.label","content":"Prop.label \nlabel \n\nAdd the given label to the property. The labels of a failing sub-property are displayed when it fails.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-prop.html#ofTestable","title":"Prop.ofTestable","content":"Prop.ofTestable \nofTestable \n\n Turns a testable type into a property. Testables are unit, boolean, Lazy testables, Gen testables, functions\n from a type for which a generator is know to a testable, tuples up to 6 tuple containing testables, and lists\n containing testables.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-prop.html#discard","title":"Prop.discard","content":"Prop.discard \ndiscard \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-propoperators.html","title":"PropOperators","content":"PropOperators \n\nOperators for Prop.\n \nPropOperators.( ==\u003E ) \n( ==\u003E ) \nPropOperators.( .\u0026. ) \n( .\u0026. ) \nPropOperators.( .|. ) \n( .|. )"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-propoperators.html#( ==\u003E )","title":"PropOperators.( ==\u003E )","content":"PropOperators.( ==\u003E ) \n( ==\u003E ) \n\nConditional property combinator. Resulting property holds if the property after ==\u003E holds whenever the condition does.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-propoperators.html#( .\u0026. )","title":"PropOperators.( .\u0026. )","content":"PropOperators.( .\u0026. ) \n( .\u0026. ) \n\nConstruct a property that succeeds if both succeed. (cfr \u0027and\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fsharp-propoperators.html#( .|. )","title":"PropOperators.( .|. )","content":"PropOperators.( .|. ) \n( .|. ) \n\nConstruct a property that fails if both fail. (cfr \u0027or\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arb.html","title":"Arb","content":"Arb \n \nArb.Array \nArray \nArb.Convert \nConvert \nArb.Filter \nFilter \nArb.From \nFrom \nArb.From \nFrom \nArb.MapFilter \nMapFilter \nArb.Nullable \nNullable \nArb.ToArbitrary \nToArbitrary \nArb.ToArbitrary \nToArbitrary \nArb.Zip \nZip"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arb.html#Array","title":"Arb.Array","content":"Arb.Array \nArray \n\n Generates one-dimensional arrays. \n The length of the generated array is between 0 and size.\n The sum of the sizes of the elements is equal to the size of the generated array.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arb.html#Convert","title":"Arb.Convert","content":"Arb.Convert \nConvert \n\nConstruct an Arbitrary instance for a type that can be mapped to and from another type (e.g. a wrapper),\nbased on a Arbitrary instance for the source type and two mapping functions. \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arb.html#Filter","title":"Arb.Filter","content":"Arb.Filter \nFilter \n\n Return an Arbitrary instance that is a filtered version of an existing arbitrary instance.\n The generator uses Gen.where, and the shrinks are filtered using Seq.filter with the given predicate.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arb.html#From","title":"Arb.From","content":"Arb.From \nFrom \n\n Construct an Arbitrary instance from a generator and shrinker.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arb.html#From","title":"Arb.From","content":"Arb.From \nFrom \n\n Construct an Arbitrary instance from a generator.\n Shrink is not supported for this type.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arb.html#MapFilter","title":"Arb.MapFilter","content":"Arb.MapFilter \nMapFilter \n\n Return an Arbitrary instance that is a mapped and filtered version of an existing arbitrary instance.\n The generator uses Gen.map with the given mapper and then Gen.where with the given predicate, \n and the shrinks are filtered using Seq.filter with the given predicate.\nThis is sometimes useful if using just a filter would reduce the chance of getting a good value\nfrom the generator - and you can map the value instead. E.g. PositiveInt.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arb.html#Nullable","title":"Arb.Nullable","content":"Arb.Nullable \nNullable \n\n Generates nullable values that are null 1/8 of the time.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arb.html#ToArbitrary","title":"Arb.ToArbitrary","content":"Arb.ToArbitrary \nToArbitrary \n\n Construct an Arbitrary instance from a generator and shrinker.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arb.html#ToArbitrary","title":"Arb.ToArbitrary","content":"Arb.ToArbitrary \nToArbitrary \n\n Construct an Arbitrary instance from a generator.\n Shrink is not supported for this type.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arb.html#Zip","title":"Arb.Zip","content":"Arb.Zip \nZip \n\n Generates 2-tuples.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arbmap.html","title":"ArbMap","content":"ArbMap \n \nArbMap.GeneratorFor \nGeneratorFor \nArbMap.Merge \nMerge \nArbMap.Merge \nMerge \nArbMap.MergeArb \nMergeArb \nArbMap.MergeArbFactory \nMergeArbFactory \nArbMap.MergeArbFactory \nMergeArbFactory \nArbMap.MergeArbFactory \nMergeArbFactory \nArbMap.Default \nDefault"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arbmap.html#GeneratorFor","title":"ArbMap.GeneratorFor","content":"ArbMap.GeneratorFor \nGeneratorFor \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arbmap.html#Merge","title":"ArbMap.Merge","content":"ArbMap.Merge \nMerge \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arbmap.html#Merge","title":"ArbMap.Merge","content":"ArbMap.Merge \nMerge \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arbmap.html#MergeArb","title":"ArbMap.MergeArb","content":"ArbMap.MergeArb \nMergeArb \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arbmap.html#MergeArbFactory","title":"ArbMap.MergeArbFactory","content":"ArbMap.MergeArbFactory \nMergeArbFactory \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arbmap.html#MergeArbFactory","title":"ArbMap.MergeArbFactory","content":"ArbMap.MergeArbFactory \nMergeArbFactory \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arbmap.html#MergeArbFactory","title":"ArbMap.MergeArbFactory","content":"ArbMap.MergeArbFactory \nMergeArbFactory \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-arbmap.html#Default","title":"ArbMap.Default","content":"ArbMap.Default \nDefault \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html","title":"Gen","content":"Gen \n \nGen.Array2DOf \nArray2DOf \nGen.Array2DOf \nArray2DOf \nGen.ArrayOf \nArrayOf \nGen.ArrayOf \nArrayOf \nGen.Cast \nCast \nGen.Choose \nChoose \nGen.CollectToArray \nCollectToArray \nGen.CollectToArray \nCollectToArray \nGen.CollectToList \nCollectToList \nGen.CollectToList \nCollectToList \nGen.CollectToSequence \nCollectToSequence \nGen.CollectToSequence \nCollectToSequence \nGen.Constant \nConstant \nGen.Elements \nElements \nGen.Elements \nElements \nGen.Four \nFour \nGen.Frequency \nFrequency \nGen.Frequency \nFrequency \nGen.Fresh \nFresh \nGen.GrowingElements \nGrowingElements \nGen.GrowingElements \nGrowingElements \nGen.ListOf \nListOf \nGen.ListOf \nListOf \nGen.NonEmptyListOf \nNonEmptyListOf \nGen.OneOf \nOneOf \nGen.OneOf \nOneOf \nGen.Or \nOr \nGen.OrNull \nOrNull \nGen.Piles \nPiles \nGen.Resize \nResize \nGen.Sample \nSample \nGen.Sample \nSample \nGen.Sample \nSample \nGen.ScaleSize \nScaleSize \nGen.Select \nSelect \nGen.SelectMany \nSelectMany \nGen.SelectMany \nSelectMany \nGen.Shuffle \nShuffle \nGen.Shuffle \nShuffle \nGen.Sized \nSized \nGen.SubListOf \nSubListOf \nGen.SubListOf \nSubListOf \nGen.Three \nThree \nGen.Two \nTwo \nGen.Where \nWhere \nGen.Zip \nZip \nGen.Zip \nZip"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Array2DOf","title":"Gen.Array2DOf","content":"Gen.Array2DOf \nArray2DOf \n\n Generates a 2D array. The square root of the size is the maximum number of rows and columns.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Array2DOf","title":"Gen.Array2DOf","content":"Gen.Array2DOf \nArray2DOf \n\n Generates a 2D array of the given dimensions.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#ArrayOf","title":"Gen.ArrayOf","content":"Gen.ArrayOf \nArrayOf \n\n Generates an array using the specified generator. \n The maximum length is size\u002B1.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#ArrayOf","title":"Gen.ArrayOf","content":"Gen.ArrayOf \nArrayOf \n\n Generates an array of a specified length.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Cast","title":"Gen.Cast","content":"Gen.Cast \nCast \n\n No-op, added to allow type annotations in LINQ expressions, e.g. from T x in e\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Choose","title":"Gen.Choose","content":"Gen.Choose \nChoose \n\n Generates integers between l and h, inclusive.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#CollectToArray","title":"Gen.CollectToArray","content":"Gen.CollectToArray \nCollectToArray \n\n Transform the given sequence into a generator of an array using the given function \n to create a generator for each element of the sequence.\n[category: Create generators from generators]\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#CollectToArray","title":"Gen.CollectToArray","content":"Gen.CollectToArray \nCollectToArray \n\n Transform the given sequence of generators into a generator of an array.\n[category: Create generators from generators]\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#CollectToList","title":"Gen.CollectToList","content":"Gen.CollectToList \nCollectToList \n\n Transform the given sequence into a generator of a List using the given function \n to create a generator for each element of the sequence.\n[category: Create generators from generators]\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#CollectToList","title":"Gen.CollectToList","content":"Gen.CollectToList \nCollectToList \n\n Transform the given sequence of generators into a generator of a List.\n[category: Create generators from generators]\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#CollectToSequence","title":"Gen.CollectToSequence","content":"Gen.CollectToSequence \nCollectToSequence \n\n Transform the given sequence into a generator of sequences using the given function \n to create a generator for each element of the sequence.\n Each sequence generated by the resulting generator can be infinite, if the source sequence is infinite.\n[category: Create generators from generators]\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#CollectToSequence","title":"Gen.CollectToSequence","content":"Gen.CollectToSequence \nCollectToSequence \n\n Transform the given sequence of generators into a generator of an array.\n Each sequence generated by the resulting generator can be infinite, if the source sequence is infinite.\n[category: Create generators from generators]\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Constant","title":"Gen.Constant","content":"Gen.Constant \nConstant \n\n Always generate the same given value. See also Fresh.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Elements","title":"Gen.Elements","content":"Gen.Elements \nElements \n\nBuild a generator that randomly generates one of the values in the given non-empty array.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Elements","title":"Gen.Elements","content":"Gen.Elements \nElements \n\nBuild a generator that randomly generates one of the values in the given non-empty, finite sequence.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Four","title":"Gen.Four","content":"Gen.Four \nFour \n\n Build a generator that generates a 4-tuple of the values generated by the given generator.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Frequency","title":"Gen.Frequency","content":"Gen.Frequency \nFrequency \n\n Build a generator that generates a value from one of the generators in the given non-empty arrat, with\n given probabilities. The sum of the probabilities must be larger than zero.\n "},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Frequency","title":"Gen.Frequency","content":"Gen.Frequency \nFrequency \n\n Build a generator that generates a value from one of the generators in the given non-empty seq, with\n given probabilities. The sum of the probabilities must be larger than zero.\n "},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Fresh","title":"Gen.Fresh","content":"Gen.Fresh \nFresh \n\n Generate fresh instances by calling create every time the generator \n generates a new value. Useful for generating new instances of mutable\n objects.\n See also constant.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#GrowingElements","title":"Gen.GrowingElements","content":"Gen.GrowingElements \nGrowingElements \n\n Build a generator that takes a non-empty array and randomly generates\n one of the values among an initial segment of that array. The size of\n this initial segment increases with the size parameter. Essentially this\n generator is Gen.Elements but taking also the size into account.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#GrowingElements","title":"Gen.GrowingElements","content":"Gen.GrowingElements \nGrowingElements \n\n Build a generator that takes a non-empty sequence and randomly generates\n one of the values among an initial segment of that sequence. The size of\n this initial segment increases with the size parameter. Essentially this\n generator is Gen.Elements but taking also the size into account.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#ListOf","title":"Gen.ListOf","content":"Gen.ListOf \nListOf \n\n Generates a list of random length. The maximum length depends on the\n size parameter.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#ListOf","title":"Gen.ListOf","content":"Gen.ListOf \nListOf \n\nGenerates a list of given length, containing values generated by the given generator.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#NonEmptyListOf","title":"Gen.NonEmptyListOf","content":"Gen.NonEmptyListOf \nNonEmptyListOf \n\n Generates a non-empty list of random length. The maximum length \n depends on the size parameter.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#OneOf","title":"Gen.OneOf","content":"Gen.OneOf \nOneOf \n\n Build a generator that generates a value from one of the generators in the given non-empty array,\n with equal probability.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#OneOf","title":"Gen.OneOf","content":"Gen.OneOf \nOneOf \n\n Build a generator that generates a value from one of the generators in the given non-empty sequence,\n with equal probability.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Or","title":"Gen.Or","content":"Gen.Or \nOr \n\n Build a generator that generates a value from two generators with equal probability.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#OrNull","title":"Gen.OrNull","content":"Gen.OrNull \nOrNull \n\n Build a generator that generates a value or \u0060null\u0060 1/8th of the time.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Piles","title":"Gen.Piles","content":"Gen.Piles \nPiles \n\n Generates random arrays of given length where the sum of\n all elements equals the given sum.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Resize","title":"Gen.Resize","content":"Gen.Resize \nResize \n\n Override the current size.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Sample","title":"Gen.Sample","content":"Gen.Sample \nSample \n\n Generates numberOfSample values with the given seed and of the given size.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Sample","title":"Gen.Sample","content":"Gen.Sample \nSample \n\n Generates numberOfSample values with the given size.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Sample","title":"Gen.Sample","content":"Gen.Sample \nSample \n\n Generates numberOfSample values with a new seed and size 50.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#ScaleSize","title":"Gen.ScaleSize","content":"Gen.ScaleSize \nScaleSize \n\nModify a size using the given function before passing it to the given generator.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Select","title":"Gen.Select","content":"Gen.Select \nSelect \n\n Create a new generator by applying selector to each value in the given generator.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#SelectMany","title":"Gen.SelectMany","content":"Gen.SelectMany \nSelectMany \n\n Creates a new generator that generates values from the source generator, \n applies the selector to them to get a new generator, and generates values \n by applying the resultSelector to the source value and the value from the second\n generator.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#SelectMany","title":"Gen.SelectMany","content":"Gen.SelectMany \nSelectMany \n\n Creates a new generator that generates values from the source generator, \n applies the selector to them, and generates values from the resulting generator.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Shuffle","title":"Gen.Shuffle","content":"Gen.Shuffle \nShuffle \n\n Generates random permutations of the given array.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Shuffle","title":"Gen.Shuffle","content":"Gen.Shuffle \nShuffle \n\n Generates random permutations of the given sequence.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Sized","title":"Gen.Sized","content":"Gen.Sized \nSized \n\n Obtain the current size. Sized(g) calls g, passing it the current size as a parameter.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#SubListOf","title":"Gen.SubListOf","content":"Gen.SubListOf \nSubListOf \n\n Generates sublists of the given array. For a given list of length n,\n each sublist has between 0 and n elements, and the order of the \n elements is the same as in the given sequence.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#SubListOf","title":"Gen.SubListOf","content":"Gen.SubListOf \nSubListOf \n\n Generates sublists of the given sequence. For a given list of length n,\n each sublist has between 0 and n elements, and the order of the \n elements is the same as in the given sequence.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Three","title":"Gen.Three","content":"Gen.Three \nThree \n\n Build a generator that generates a 3-tuple of the values generated by the given generator.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Two","title":"Gen.Two","content":"Gen.Two \nTwo \n\n Build a generator that generates a 2-tuple of the values generated by the given generator.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Where","title":"Gen.Where","content":"Gen.Where \nWhere \n\n Generates only values from the source generator that satisfy the predicate. This function keeps re-trying\n by increasing the size of the original generator ad infinitum. Make sure there is a high chance that \n the predicate is satisfied.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Zip","title":"Gen.Zip","content":"Gen.Zip \nZip \n\nCombine two generators into a new generator of the result of the given result selector.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-gen.html#Zip","title":"Gen.Zip","content":"Gen.Zip \nZip \n\nCombine two generators into a generator of pairs.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html","title":"Prop","content":"Prop \n\nExtensions to construct Properties.\n \nProp.And \nAnd \nProp.And \nAnd \nProp.And \nAnd \nProp.And \nAnd \nProp.And \nAnd \nProp.And \nAnd \nProp.And \nAnd \nProp.And \nAnd \nProp.Classify \nClassify \nProp.Classify \nClassify \nProp.Classify \nClassify \nProp.Classify \nClassify \nProp.Collect \nCollect \nProp.Collect \nCollect \nProp.Collect \nCollect \nProp.Collect \nCollect \nProp.Discard \nDiscard \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.ForAll \nForAll \nProp.Implies \nImplies \nProp.Implies \nImplies \nProp.Implies \nImplies \nProp.Implies \nImplies \nProp.Label \nLabel \nProp.Label \nLabel \nProp.Label \nLabel \nProp.Label \nLabel \nProp.Or \nOr \nProp.Or \nOr \nProp.Or \nOr \nProp.Or \nOr \nProp.Or \nOr \nProp.Or \nOr \nProp.Or \nOr \nProp.Or \nOr \nProp.ToProperty \nToProperty \nProp.ToProperty \nToProperty \nProp.ToProperty \nToProperty \nProp.Trivial \nTrivial \nProp.Trivial \nTrivial \nProp.Trivial \nTrivial \nProp.Trivial \nTrivial \nProp.When \nWhen \nProp.When \nWhen \nProp.When \nWhen \nProp.When \nWhen \nProp.When \nWhen \nProp.When \nWhen"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#And","title":"Prop.And","content":"Prop.And \nAnd \n\nConstruct a property that succeeds if both succeed. (cfr \u0027and\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#And","title":"Prop.And","content":"Prop.And \nAnd \n\nConstruct a property that succeeds if both succeed. (cfr \u0027and\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#And","title":"Prop.And","content":"Prop.And \nAnd \n\nConstruct a property that succeeds if both succeed. (cfr \u0027and\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#And","title":"Prop.And","content":"Prop.And \nAnd \n\nConstruct a property that succeeds if both succeed. (cfr \u0027and\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#And","title":"Prop.And","content":"Prop.And \nAnd \n\nConstruct a property that succeeds if both succeed. (cfr \u0027and\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#And","title":"Prop.And","content":"Prop.And \nAnd \n\nConstruct a property that succeeds if both succeed. (cfr \u0027and\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#And","title":"Prop.And","content":"Prop.And \nAnd \n\nConstruct a property that succeeds if both succeed. (cfr \u0027and\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#And","title":"Prop.And","content":"Prop.And \nAnd \n\nConstruct a property that succeeds if both succeed. (cfr \u0027and\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Classify","title":"Prop.Classify","content":"Prop.Classify \nClassify \n\nClassify test cases. Test cases satisfying the condition are assigned the classification given.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Classify","title":"Prop.Classify","content":"Prop.Classify \nClassify \n\nClassify test cases. Test cases satisfying the condition are assigned the classification given.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Classify","title":"Prop.Classify","content":"Prop.Classify \nClassify \n\nClassify test cases. Test cases satisfying the condition are assigned the classification given.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Classify","title":"Prop.Classify","content":"Prop.Classify \nClassify \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Collect","title":"Prop.Collect","content":"Prop.Collect \nCollect \n\nCollect data values. The argument of collect is evaluated in each test case, \nand the distribution of values is reported.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Collect","title":"Prop.Collect","content":"Prop.Collect \nCollect \n\nCollect data values. The argument of collect is evaluated in each test case, \nand the distribution of values is reported.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Collect","title":"Prop.Collect","content":"Prop.Collect \nCollect \n\nCollect data values. The argument of collect is evaluated in each test case, \nand the distribution of values is reported.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Collect","title":"Prop.Collect","content":"Prop.Collect \nCollect \n\nCollect data values. The argument of collect is evaluated in each test case, \nand the distribution of values is reported.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Discard","title":"Prop.Discard","content":"Prop.Discard \nDiscard \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ForAll","title":"Prop.ForAll","content":"Prop.ForAll \nForAll \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Implies","title":"Prop.Implies","content":"Prop.Implies \nImplies \n\nConditional property combinator. Resulting property holds if the property holds when the condition does.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Implies","title":"Prop.Implies","content":"Prop.Implies \nImplies \n\nConditional property combinator. Resulting property holds if the property holds when the condition does.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Implies","title":"Prop.Implies","content":"Prop.Implies \nImplies \n\nConditional property combinator. Resulting property holds if the property holds when the condition does.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Implies","title":"Prop.Implies","content":"Prop.Implies \nImplies \n\nConditional property combinator. Resulting property holds if the property holds when the condition does.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Label","title":"Prop.Label","content":"Prop.Label \nLabel \n\nAdd the given label to the property. The labels of a failing sub-property are displayed when it fails.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Label","title":"Prop.Label","content":"Prop.Label \nLabel \n\nAdd the given label to the property. The labels of a failing sub-property are displayed when it fails.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Label","title":"Prop.Label","content":"Prop.Label \nLabel \n\nAdd the given label to the property. The labels of a failing sub-property are displayed when it fails.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Label","title":"Prop.Label","content":"Prop.Label \nLabel \n\nAdd the given label to the property. The labels of a failing sub-property are displayed when it fails.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Or","title":"Prop.Or","content":"Prop.Or \nOr \n\nConstruct a property that fails if both fail. (cfr \u0027or\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Or","title":"Prop.Or","content":"Prop.Or \nOr \n\nConstruct a property that fails if both fail. (cfr \u0027or\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Or","title":"Prop.Or","content":"Prop.Or \nOr \n\nConstruct a property that fails if both fail. (cfr \u0027or\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Or","title":"Prop.Or","content":"Prop.Or \nOr \n\nConstruct a property that fails if both fail. (cfr \u0027or\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Or","title":"Prop.Or","content":"Prop.Or \nOr \n\nConstruct a property that fails if both fail. (cfr \u0027or\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Or","title":"Prop.Or","content":"Prop.Or \nOr \n\nConstruct a property that fails if both fail. (cfr \u0027or\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Or","title":"Prop.Or","content":"Prop.Or \nOr \n\nConstruct a property that fails if both fail. (cfr \u0027or\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Or","title":"Prop.Or","content":"Prop.Or \nOr \n\nConstruct a property that fails if both fail. (cfr \u0027or\u0027)\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ToProperty","title":"Prop.ToProperty","content":"Prop.ToProperty \nToProperty \n\n Turns a testable type into a property.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ToProperty","title":"Prop.ToProperty","content":"Prop.ToProperty \nToProperty \n\n Turns a testable type into a property.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#ToProperty","title":"Prop.ToProperty","content":"Prop.ToProperty \nToProperty \n\n Turns a testable type into a property.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Trivial","title":"Prop.Trivial","content":"Prop.Trivial \nTrivial \n\nCount trivial cases. Test cases for which the condition is True are classified as trivial.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Trivial","title":"Prop.Trivial","content":"Prop.Trivial \nTrivial \n\nCount trivial cases. Test cases for which the condition is True are classified as trivial.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Trivial","title":"Prop.Trivial","content":"Prop.Trivial \nTrivial \n\nCount trivial cases. Test cases for which the condition is True are classified as trivial.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#Trivial","title":"Prop.Trivial","content":"Prop.Trivial \nTrivial \n\nCount trivial cases. Test cases for which the condition is True are classified as trivial.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#When","title":"Prop.When","content":"Prop.When \nWhen \n\nConditional property combinator. Resulting property holds if the given property holds whenever the condition does. See also operator: \u0027assertion ==\u003E property\u0027\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#When","title":"Prop.When","content":"Prop.When \nWhen \n\nConditional property combinator. Resulting property holds if the given property holds whenever the condition does. See also operator: \u0027assertion ==\u003E property\u0027\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#When","title":"Prop.When","content":"Prop.When \nWhen \n\nConditional property combinator. Resulting property holds if the property holds when the condition does.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#When","title":"Prop.When","content":"Prop.When \nWhen \n\nConditional property combinator. Resulting property holds if the property holds when the condition does.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#When","title":"Prop.When","content":"Prop.When \nWhen \n\nConditional property combinator. Resulting property holds if the property holds when the condition does.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-fluent-prop.html#When","title":"Prop.When","content":"Prop.When \nWhen \n\nConditional property combinator. Resulting property holds if the property holds when the condition does.\n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric.html","title":"Numeric","content":"Numeric \n\n Adapted slightly from FSharpPlus, https://github.com/fsprojects/FSharpPlus/blob/master/LICENSE.md\n \nNumeric.MaxValue \nMaxValue \nNumeric.MinValue \nMinValue"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html","title":"MaxValue","content":"MaxValue \n \nMaxValue.Get \nGet \nMaxValue.MaxValue \nMaxValue \nMaxValue.MaxValue \nMaxValue \nMaxValue.MaxValue \nMaxValue \nMaxValue.MaxValue \nMaxValue \nMaxValue.MaxValue \nMaxValue \nMaxValue.MaxValue \nMaxValue \nMaxValue.MaxValue \nMaxValue \nMaxValue.MaxValue \nMaxValue \nMaxValue.MaxValue \nMaxValue \nMaxValue.MaxValue \nMaxValue \nMaxValue.MaxValue \nMaxValue \nMaxValue.MaxValue \nMaxValue \nMaxValue.MaxValue \nMaxValue \nMaxValue.MaxValue \nMaxValue \nMaxValue.MaxValue \nMaxValue \nMaxValue.MaxValue \nMaxValue \nMaxValue.MaxValue \nMaxValue"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#Get","title":"MaxValue.Get","content":"MaxValue.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-maxvalue.html#MaxValue","title":"MaxValue.MaxValue","content":"MaxValue.MaxValue \nMaxValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html","title":"MinValue","content":"MinValue \n \nMinValue.Get \nGet \nMinValue.MinValue \nMinValue \nMinValue.MinValue \nMinValue \nMinValue.MinValue \nMinValue \nMinValue.MinValue \nMinValue \nMinValue.MinValue \nMinValue \nMinValue.MinValue \nMinValue \nMinValue.MinValue \nMinValue \nMinValue.MinValue \nMinValue \nMinValue.MinValue \nMinValue \nMinValue.MinValue \nMinValue \nMinValue.MinValue \nMinValue \nMinValue.MinValue \nMinValue \nMinValue.MinValue \nMinValue \nMinValue.MinValue \nMinValue \nMinValue.MinValue \nMinValue \nMinValue.MinValue \nMinValue \nMinValue.MinValue \nMinValue"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#Get","title":"MinValue.Get","content":"MinValue.Get \nGet \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-numeric-minvalue.html#MinValue","title":"MinValue.MinValue","content":"MinValue.MinValue \nMinValue \n"},{"uri":"https://fscheck.github.io/FsCheck/reference/fscheck-internals-shrink-1.html","title":"Shrink\u003C\u0027T\u003E","content":"Shrink\u003C\u0027T\u003E \n\n Shrink\u003CT\u003E keeps a value and the possible shrinks for that value in an n-ary tree.\n This tree is explored by the test runner to find a smaller value of a counter-example.\n"},{"uri":"https://fscheck.github.io/FsCheck/index.html","title":"FsCheck: Random Testing for .NET\r\n","content":"(**\nFsCheck: Random Testing for .NET\n================================\n\nFsCheck is a tool for testing .NET programs automatically. The programmer provides a specification of the program, in the form of properties which functions, methods or objects should satisfy, and FsCheck then tests that the properties hold in a large number of randomly generated cases. While writing the properties, you are actually writing a testable specification of your program. Specifications are expressed in F#, C# or VB, using combinators defined in the FsCheck library. FsCheck provides combinators to define properties, observe the distribution of test data, and define test data generators. When a property fails, FsCheck automatically displays a minimal counter example.\n\nFsCheck, NUnit and xUnit.NET plugin can be \u003Ca href=\u0022https://www.nuget.org/packages?q=fscheck\u0022\u003Einstalled from NuGet\u003C/a\u003E using your favorite package manager.\n\nUsers have also created integrations with [Expecto](https://github.com/haf/Expecto), \n[Fuchu](https://github.com/mausch/Fuchu), \n[AutoFixture](https://github.com/AutoFixture/AutoFixture) and \n[MSTest](https://github.com/microsoft/testfx) that \nyou can [find on NuGet](https://www.nuget.org/packages?q=fscheck).\n\nWarning: Documentation\n----------------------\n\nThe Documentation section below was written for version 2.x, but 3.x is the version that is currently maintained. Only v3 will get new features and fixes, even though it\u0027s in pre-release.\n\nThis leaves us in the unfortunate position that some documentation is out of date and incomplete. One exception is the API docs. They are generated from the 3.x code and are accurate - if in doubt, believe the API docs.\n\nThe documentation and API docs for 2.x are not easily accessible anymore. The last commit of the 2.x documentation site is [here](https://github.com/fscheck/FsCheck/tree/1458b268b4311f7e4b25871715f1f9b5d58a21b3).\n\nPleae help fixing this! FsCheck welcoms contributions of all kinds, big or small. See [issues](https://github.com/fscheck/FsCheck/issues?q=is%3Aissue\u002Bis%3Aopen\u002Blabel%3A%22help\u002Bwanted%22) for inspiration. Feel free to open an issue to highlight specific documentation problems or gaps, even if you\u0027re not sure it really is a problem. At worst you\u0027ll get an answer to your question.\n\nDocumentation\n-------------\n\n * [QuickStart](QuickStart.html) to get started.\n\n * [Properties](Properties.html) describes FsCheck\u0027s language to express tests - \n in other frameworks these are often called parametrized tests or\n generative tests. FsCheck calls them properties.\n\n * [Generating test data](TestData.html) describes how to guide FsCheck to\n generate better data or to stop it from generating data that doesn\u0027t make\n sense for what you\u0027re trying to test. FsCheck has a flexible language to describe test \n value generators and shrinkers, and apply them to your properties.\n\n * [Running Tests](RunningTests.html) explains various ways to run FsCheck tests and how to\n integrate with unit testing frameworks.\n\n * [Model based testing](StatefulTestingNew.html), for testing stateful systems and objects. Since this is in the Experimental namespace, semantic versioning promises do not apply to this part of the API.\n\n * [Tips and tricks](TipsAndTricks.html) \n\n * [API Reference](reference/index.html) contains automatically generated documentation for all types, modules\n and functions.\n\n\n \nContributing and copyright\n--------------------------\n\nThe project is hosted on [GitHub][gh] where you can [report issues][issues], fork \nthe project and submit pull requests. If you\u0027re adding new public API, please also \nconsider adding [samples][content] that can be turned into documentation.\n\nThe library is available under the BSD license, which allows modification and \nredistribution for both commercial and non-commercial purposes. For more information see the \n[License file][license] in the GitHub repository. \n\n [content]: https://github.com/fscheck/FsCheck/tree/master/docs\n [gh]: https://github.com/fscheck/FsCheck\n [issues]: https://github.com/fscheck/FsCheck/issues\n [readme]: https://github.com/fscheck/FsCheck/blob/master/README.md\n [license]: https://github.com/fscheck/FsCheck/blob/master/License.txt\n*)"},{"uri":"https://fscheck.github.io/FsCheck/LearningResources.html","title":"Learning resources\r\n","content":"# Learning resources\r\n\r\n## Articles\r\n\r\n* \u0022FsCheck 3: Property-based testing in C#\u0022 - introduction to FsCheck 3 [link](https://wqplease.com/p/fscheck-3-property-based-testing-in-c-3ba4a2a50388)\r\n* A six-part series on understanding property-based testing through implementing a simplified PBT library: [1](https://getcode.substack.com/p/property-based-testing-1-what-is), [2](https://getcode.substack.com/p/-property-based-testing-2-the-essentials), [3](https://getcode.substack.com/p/property-based-testing-3-shrinking), [4](https://getcode.substack.com/p/property-based-testing-4-unifying), [5](https://getcode.substack.com/p/property-based-testing-5-shrinking), [6](https://getcode.substack.com/p/property-based-testing-6-random-all).\r\n* \u0022QuickCheck: A Lightweight Tool for Random Testing of Haskell Programs\u0022 by Koen Claessen and John Hughes [pdf](http://www.eecs.northwestern.edu/~robby/courses/395-495-2009-fall/quick.pdf)\r\n* \u0022An introduction to property-based testing\u0022 by Scott Wlaschin [link](http://fsharpforfunandprofit.com/posts/property-based-testing/)\r\n* \u0022Choosing properties for property-based testing\u0022 by Scott Wlaschin [link](http://fsharpforfunandprofit.com/posts/property-based-testing-2/)\r\n* An interesting read about QuickCheck is in [Chapter 11](http://book.realworldhaskell.org/read/testing-and-quality-assurance.html) of the excellent [Real world Haskell](http://book.realworldhaskell.org) book. The book is freely available online, but do the authors a favor and buy it, it\u0027s really worth it also for F# programmers.\r\n* [This section](http://opcoast.com/demos/fsharp/part3.html) of the [Learning F#: Case study with Branch and Bound](http://opcoast.com/demos/fsharp/index.html) article demonstrates uses of FsCheck to test functions that arise in development of a branch and bound algorithm.\r\n\r\n## Books\r\n\r\n* \u0022Property-Based Testing with PropEr, Erlang, and Elixir: Find Bugs Before Your Users Do\u0022 by Fred Hebert [link](https://pragprog.com/titles/fhproper/property-based-testing-with-proper-erlang-and-elixir).\r\n\r\n## Videos\r\n\r\n* \u0022The lazy programmer\u0027s guide to writing 1000\u0027s of tests: An introduction to property based testing\u0022 by Scott Wlaschin [video](https://www.youtube.com/watch?v=IYzDFHx6QPY)\r\n* \u0022Race Conditions, Distribution, Interactions - Testing the Hard Stuff and Staying Sane\u0022 by John Hughes [video](https://vimeo.com/68383317)\r\n* \u0022Property-Based Testing for Better Code\u0022 by Jessica Kerr [video](https://www.youtube.com/watch?v=shngiiBfD80)\r\n"},{"uri":"https://fscheck.github.io/FsCheck/Properties.html","title":"Properties\r\n","content":"(*** hide ***)\n#I \u0022../src/FsCheck/bin/Release/netstandard2.0\u0022\n#r \u0022FsCheck\u0022\n\nopen FsCheck\nopen FsCheck.FSharp\nopen System\n\n(**\n# Properties\n\nProperties are expressed as F# function definitions or C# lambdas or methods. \nProperties are universally quantified over their parameters, so *)\n\nlet revRevIsOrig (xs:list\u003Cint\u003E) = List.rev(List.rev xs) = xs\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/Properties.cs,key=revRevIsOrig]\n\nmeans that the equality holds for all lists xs.\n\nProperties must not have generic types - because there can be so many different\nkinds of constraints on generic types, some of which may not even be visible from the\ntype signature, we currently think allowing FsCheck to generate a generic type is not worth the added complexity. \nIt\u0027s very simple to fix any types anyway simply by adding some type annotations.\n\nFsCheck can check properties of various forms - these forms are called testable, \nand are indicated in the API by a generic type called \u0060\u0027Testable\u0060. A \u0060\u0027Testable\u0060 may \nbe a function of any number of parameters that returns bool or unit. In the latter case, \n a test passes if it does not throw. The entry point to create properties is the Prop module.\n\n Like all of FsCheck\u0027s API, there are C# counterparts for all of the F# methods described.\n \n## Conditional Properties\n\nProperties may take the form \u0060\u003Ccondition\u003E ==\u003E \u003Cproperty\u003E\u0060\n\nFor example,*)\n\n(***hide***)\nlet rec ordered xs = \n match xs with\n | [] -\u003E true\n | [x] -\u003E true\n | x::y::ys -\u003E (x \u003C= y) \u0026\u0026 ordered (y::ys)\nlet rec insert x xs = \n match xs with\n | [] -\u003E [x]\n | c::cs -\u003E if x \u003C= c then x::xs else c::(insert x cs)\n\n(***define-output:insertKeepsOrder***)\nlet insertKeepsOrder (x:int) xs = ordered xs ==\u003E ordered (insert x xs)\nCheck.Quick insertKeepsOrder\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/Properties.cs,key=insertKeepsOrder] *)\n\n(***include-output:insertKeepsOrder***)\n\n(**\nSuch a property holds if the property after \u0060==\u003E\u0060 holds whenever the condition does.\n\nTesting discards test cases which do not satisfy the condition. Test case generation \ncontinues until 100 cases which do satisfy the condition have been found, or until \nan overall limit on the number of test cases is reached (to avoid looping if the condition \nnever holds). In this case a message such as \u0022Arguments exhausted after 97 tests.\u0022\nindicates that 97 test cases satisfying the condition were found, and that the property held in those 97 cases.\n\nNotice that in this case the generated values had to be restricted to int. This is because the generated \nvalues need to be comparable, but this is not reflected in the types. Therefore, without the explicit \nrestriction, FsCheck could generate lists containing different types (subtypes of objects), and these are not mutually comparable.\n \n## Lazy Properties\n\nSince F# has eager evaluation by default, the above property does more work than necessary: \nit evaluates the property at the right of the condition no matter what the \noutcome of the condition on the left. While only a performance consideration in the above \nexample, this may limit the expressiveness of properties - consider:*)\n\n(***define-output: eager***)\nlet tooEager a = a \u003C\u003E 0 ==\u003E (1/a = 1/a)\nCheck.Quick tooEager\n\n(***include-output: eager***)\n\n(**\nNon-strict evaluation is needed here to make sure the propery is checked correctly:*)\n\n(***define-output: lazy***)\nlet moreLazy a = a \u003C\u003E 0 ==\u003E (lazy (1/a = 1/a))\nCheck.Quick moreLazy\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/Properties.cs,key=lazy] *)\n\n(***include-output: lazy***)\n\n(**\n## Quantified Properties\n\nProperties may take the form \u0060forAll \u003Carbitrary\u003E (fun \u003Cargs\u003E -\u003E \u003Cproperty\u003E)\u0060.\n\nFor example, *)\n\n(***define-output:insertWithArb***)\nlet orderedList = ArbMap.defaults |\u003E ArbMap.arbitrary\u003Clist\u003Cint\u003E\u003E |\u003E Arb.mapFilter List.sort ordered\nlet insertWithArb x = Prop.forAll orderedList (fun xs -\u003E ordered(insert x xs))\nCheck.Quick insertWithArb\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/Properties.cs,key=insertWithArb] *)\n\n(***include-output:insertWithArb***)\n\n(**\nThe first argument of forAll is an IArbitrary instance. Such an instance \nencapsulates a test data generator and a shrinker (more on that in [Test Data](TestData.html)).\nBy supplying a custom generator, instead of using the default generator \nfor that type, it is possible to control the distribution of test data. In \nthe example, by supplying a custom generator for ordered lists, rather than \nfiltering out test cases which are not ordered, we guarantee that 100 test \ncases can be generated without reaching the overall limit on test cases. \nCombinators for defining generators are described in [Test Data](TestData.html).\n \n## Expecting exceptions\n\nYou may want to test that a function or method throws an exception under certain circumstances. \nUse \u0060throws\u003C\u0027e :\u003E exn,\u0027a\u003E Lazy\u003C\u0027a\u003E\u0060 to achieve this. For example:*)\n\n(***define-output: expectDivideByZero***)\nlet expectDivideByZero() = Prop.throws\u003CDivideByZeroException,_\u003E (lazy (raise \u003C| DivideByZeroException()))\nCheck.Quick expectDivideByZero\n\n(***include-output: expectDivideByZero***)\n \n(**\nThis functionality is not available in the C# API.\n\n \n## Observing Test Case Distribution\n\nIt is important to be aware of the distribution of test cases: if test data is not well \ndistributed then conclusions drawn from the test results may be invalid. In particular, \nthe \u0060==\u003E\u0060 operator can skew the distribution of test data badly, since only test data which \nsatisfies the given condition is used.\n\nFsCheck provides several ways to observe the distribution of test data. Code for \nmaking observations is incorporated into the statement of properties, each time \nthe property is actually tested the observation is made, and the collected observations \nare then summarized when testing is complete.\n\n### Counting Trivial Cases\n\nA property may take the form \u0060trivial \u003Ccondition\u003E \u003Cproperty\u003E\u0060\n\nFor example,*)\n\n(***define-output:insertTrivial***)\nlet insertTrivial (x:int) xs = \n ordered xs ==\u003E (ordered (insert x xs))\n |\u003E Prop.trivial (List.length xs = 0)\nCheck.Quick insertTrivial\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/Properties.cs,key=insertTrivial]\n\nTest cases for which the condition is true are classified as trivial, and the proportion of \ntrivial test cases in the total is reported:*)\n\n(***include-output:insertTrivial***)\n\n(**\n### Classifying Test Cases\n\nA property may take the form \u0060classify \u003Ccondition\u003E \u003Cstring\u003E \u003Cproperty\u003E\u0060\n\nFor example,*)\n\n(***define-output:insertClassify***)\nlet insertClassify (x:int) xs = \n ordered xs ==\u003E (ordered (insert x xs))\n |\u003E Prop.classify (ordered (x::xs)) \u0022at-head\u0022\n |\u003E Prop.classify (ordered (xs @ [x])) \u0022at-tail\u0022\nCheck.Quick insertClassify\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/Properties.cs,key=insertClassify]\n\nTest cases satisfying the condition are assigned the classification given, and the distribution of \nclassifications is reported after testing:*)\n\n(***include-output:insertClassify***)\n\n(**\nNote that a test case may fall into more than one classification.\n\n### Collecting Data Values\n\nA property may take the form \u0060collect \u003Cexpression\u003E \u003Cproperty\u003E\u0060\n\nFor example,*)\n\n(***define-output: insertCollect***)\nlet insertCollect (x:int) xs = \n ordered xs ==\u003E (ordered (insert x xs))\n |\u003E Prop.collect (List.length xs)\nCheck.Quick insertCollect\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/Properties.cs,key=insertCollect]\n\nThe argument of collect is evaluated in each test case, and the distribution of \nvalues is reported. The type of this argument is printed using \u0060sprintf \u0022%A\u0022\u0060:*)\n\n(***include-output: insertCollect***)\n\n(** \n### Combining Observations\n\nThe observations described here may be combined in any way. All the observations \nof each test case are combined, and the distribution of these combinations is \nreported. For example:*)\n\n(***define-output:insertCombined***)\nlet insertCombined (x:int) xs = \n ordered xs ==\u003E (ordered (insert x xs))\n |\u003E Prop.classify (ordered (x::xs)) \u0022at-head\u0022\n |\u003E Prop.classify (ordered (xs @ [x])) \u0022at-tail\u0022\n |\u003E Prop.collect (List.length xs)\nCheck.Quick insertCombined\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/Properties.cs,key=insertCombined]*)\n\n(***include-output:insertCombined***)\n\n(**\n## And, Or and Labels\n\nProperties may take the form\n\n* \u0060\u003Cproperty\u003E .\u0026. \u003Cproperty\u003E\u0060 succeeds if both succeed, fails if one of the properties fails, and is rejected when both are rejected.\n* \u0060\u003Cproperty\u003E .|. \u003Cproperty\u003E\u0060succeeds if either property succeeds, fails if both properties fail, and is rejected when both are rejected.\n\nThe \u0060.\u0026.\u0060 combinator is most commonly used to write complex properties which share a generator. \nIn that case, it might be difficult upon failure to know excactly which sub-property has caused the failure. \nThat\u0027s why you can label sub-properties, and FsCheck shows the labels of the failed subproperties when \nit finds a counter-example using \u0060Prop.label\u0060.\n\nFor example,*)\n\n(***define-output:complex***)\nlet complex (m: int) (n: int) =\n let res = n \u002B m\n (res \u003E= m) |\u003E Prop.label \u0022result \u003E #1\u0022 .\u0026.\n (res \u003E= n) |\u003E Prop.label \u0022result \u003E #2\u0022 .\u0026. \n (res \u003C m \u002B n) |\u003E Prop.label \u0022result not sum\u0022\nCheck.Quick complex\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/Properties.cs,key=complexProperty]*)\n\n(***include-output:complex***)\n\n(**\nIt\u0027s perfectly fine to apply more than one label to a property; FsCheck displays all the applicable labels. \nThis is useful for displaying intermediate results, for example:*)\n\n(***define-output:multiply***)\nlet multiply (n: int, m: int) =\n let res = n*m\n sprintf \u0022evidence = %i\u0022 res @| (\n Prop.label \u0022div1\u0022 (m \u003C\u003E 0 ==\u003E lazy (res / m = n)) .\u0026. \n Prop.label \u0022div2\u0022 (n \u003C\u003E 0 ==\u003E lazy (res / n = m)) .\u0026. \n Prop.label \u0022lt1\u0022 (res \u003E m) .\u0026. \n Prop.label \u0022lt2\u0022 (res \u003E n))\nCheck.Quick multiply\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/Properties.cs,key=multipleLabels]*)\n\n(***include-output:multiply***)"},{"uri":"https://fscheck.github.io/FsCheck/QuickStart.html","title":"Quick Start\r\n","content":"(*** hide ***)\n#I @\u0022../src/FsCheck/bin/Release/netstandard2.0\u0022\n#r @\u0022../src/FsCheck.Xunit/bin/Release/netstandard2.0/FsCheck.Xunit.dll\u0022\n#r @\u0022../packages/xunit.abstractions/lib/netstandard1.0/xunit.abstractions.dll\u0022\n#r @\u0022../packages/xunit.extensibility.core/lib/netstandard1.1/xunit.core.dll\u0022\n#r @\u0022../packages/xunit.extensibility.execution/lib/netstandard1.1/xunit.execution.dotnet.dll\u0022\n#r \u0022FsCheck\u0022\n\n(**\n# Quick Start\n\nThe fastest way to understand how FsCheck works is by writing some *properties* - FsCheck\u0027s terminology for a parametrized\ntest, or a generative test - and run them using the built-in test runner. Later on, we\u0027ll describe how they can be integrated\nwith existing test frameworks like NUnit, xUnit.NET or MsTest.\n\nFirst install FsCheck, open an fsx file and start with:*)\n\n#r \u0022nuget:FsCheck\u0022\n\nopen FsCheck\n\n(** In C#: To easily experiment, start a new console app to execute the snippets below (the output is written to console\nby default). Alternatively, in LinqPad, reference FsCheck.dll and FSharp.Core.dll, open namespace FsCheck, change the language to \u0022C# statements\u0022\nand you should be able to execute most of the snippets as well. \n\n## A Simple Example\n\nA simple example of a property - a test with parameters - is written as a normal F# function that returns a bool: *)\n\nlet revRevIsOrig (xs:list\u003Cint\u003E) = List.rev(List.rev xs) = xs\n(** This property asserts that the reverse of the reverse of a list is the list itself. \nTo check the property, we load this definition in F# interactive and then invoke *)\n\n(*** define-output: revRevIsOrig ***)\nCheck.Quick revRevIsOrig\n\n(*** include-output: revRevIsOrig ***)\n\n(** In C#:\n\n [lang=csharp,file=../examples/CSharp.DocSnippets/QuickStart.cs,key=revRevIsOrig]\n\nWhen a property fails, FsCheck displays a counter-example. For example, if we define *)\n\n(*** define-output: revIsOrig ***)\nlet revIsOrig (xs:list\u003Cint\u003E) = List.rev xs = xs\nCheck.Quick revIsOrig\n\n(*** include-output: revIsOrig ***)\n\n(** In C#: \n\n [lang=csharp,file=../examples/CSharp.DocSnippets/QuickStart.cs,key=revIsOrig]\n\nFsCheck also *shrinks* the counter example: it tries to find the minimal counter example that \nstill fails the property. The counter example is indeed minimal: \nthe list must have at least two different elements for the test to fail. FsCheck displays how many times it \nfound a smaller (in some way) counter example and so proceeded to shrink further.\n\nTo learn more on how to write properties, see [Properties](Properties.html).\n\n## What do I do if a test loops or encounters an error?\n\nIn this case we know that the property does not hold, but Check.Quick does not display the counter-example. \nThere is another testing function provided for this situation. Repeat the test using \n\u003Cpre\u003ECheck.Verbose\u003C/pre\u003E or in C# \u003Cpre\u003EVerboseCheck()\u003C/pre\u003E\nwhich displays each test case before running the test: the last test case displayed is thus\nthe one in which the loop or error arises.\n\nTo learn more on how to run FsCheck tests see [Running Tests](RunningTests.html).\n\n## FsCheck teaches us a lesson\n\nThe property above (the reverse of the reverse of a list is the list itself) is not always correct. \nConsider a list of floats that contains \u0060NaN\u0060 (not a number). Since \u0060NaN \u003C\u003E NaN\u0060, the reverse of \nthe reverse of \u0060[NaN]\u0060 is not actually equal to \u0060[NaN]\u0060. FsCheck has a knack for finding this kind of specification problem. \nTo see this error, ask FsCheck to generate lists of floats:*)\n\n(***define-output:revFloat***)\nlet revRevIsOrigFloat (xs:list\u003Cfloat\u003E) = List.rev(List.rev xs) = xs\nCheck.Quick revRevIsOrigFloat\n\n(***include-output:revFloat***)\n\n(** That said, the example in C# using floats actually works!\n\n [lang=csharp,file=../examples/CSharp.DocSnippets/QuickStart.cs,key=revRevIsOrigFloat]\n\nThis is because SequenceEquals uses the default equality comparer under the hood, which uses \u0060Double\u0060\u0027s \u0060Equals\u0060 method, which\nhas a special provision for \u0060NaN\u0060, as you can see in the [reference source](http://referencesource.microsoft.com/#mscorlib/system/double.cs,152).\nIf we pass an \u0060EqualityComparer\u0060 that uses \u0060==\u0060 to \u0060SequenceEquals\u0060, the C# example also fails.\n\nAs this seemingly trivial example shows, FsCheck helps you discover interesting properties of your code - and so ultimately,\nmore bugs!\n\n## Using FsCheck with other testing frameworks\n\nOnce you have finished your initial exploration of FsCheck, you\u0027ll probably want to use it with your existing\nunit test framework to augment unit tests or just to run the properties more easily. Below, we\u0027ll show some\nintegration, but we leave it up to you to choose whichever suits your environment best.\n\n### Integration with Expecto\n\nSome testing frameworks like Expecto have an out-of-the-box integration with FsCheck. By using one of the runners that\nsupport FsCheck out of the box, you gain access the the frameworks\u0027 reporting capabilities and integrations with IDEs\nand build tooling.\n\nHere\u0027s a sample:\n\n\u0060\u0060\u0060fsharp\nopen Expecto\nopen Expecto.ExpectoFsCheck\n\nlet config = { FsCheck.Config.Default with MaxTest = 10000 }\n\nlet properties =\n testList \u0022FsCheck samples\u0022 [\n testProperty \u0022Addition is commutative\u0022 \u003C| fun a b -\u003E\n a \u002B b = b \u002B a\n \n testProperty \u0022Reverse of reverse of a list is the original list\u0022 \u003C|\n fun (xs:list\u003Cint\u003E) -\u003E List.rev (List.rev xs) = xs\n\n // you can also override the FsCheck config\n testPropertyWithConfig config \u0022Product is distributive over addition\u0022 \u003C|\n fun a b c -\u003E\n a * (b \u002B c) = a * b \u002B a * c\n ]\n\nTests.runTests defaultConfig properties\n\u0060\u0060\u0060\n\n### Integration with xUnit\n\nAnother frequently used runner is xUnit.NET. Here is how to write \nthe unit test above so it can be run from xUnit.NET:*)\n\nopen global.Xunit\n\n[\u003CFact\u003E]\nlet \u0060\u0060Reverse of reverse of a list is the original list\u0060\u0060() =\n let revRevIsOrig (xs:list\u003Cint\u003E) = List.rev(List.rev xs) = xs\n Check.QuickThrowOnFailure revRevIsOrig\n \n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/QuickStart.cs,key=revRevIsOrigFact]\n\nFor xUnit, the test looks like any normal test, and the QuickThrowOnFailure ensures that if the test fails,\nan exception with the necessary information is raised so xUnit knows the test failed. The output of the test is the same\nas above.\n\n### Using FsCheck with xUnit.NET using the plugin\n\nxUnit.NET is \u0022blessed\u0022 with an FsCheck plugin. To use it, install the FsCheck.Xunit NuGet package. The test above can now\nbe written more tersely as follows:*)\n\nopen FsCheck.Xunit\n\n[\u003CProperty\u003E]\nlet \u0060\u0060Reverse of reverse of a list is the original list \u0060\u0060(xs:list\u003Cint\u003E) =\n List.rev(List.rev xs) = xs\n \n(** xUnit now shows the test similarly to a regular test, and is able to run it directly.\n\nTo learn more on how to use this integration or integration with other frameworks like NUnit,\nsee [Running Tests](RunningTests.html). *)"},{"uri":"https://fscheck.github.io/FsCheck/RunningTests.html","title":"Running tests\r\n","content":"open FsCheck.FSharp\n\n\n(*** hide ***)\n#I @\u0022../src/FsCheck/bin/Release/netstandard2.0\u0022\n#I @\u0022../src/FsCheck.Xunit/bin/Release/netstandard2.0\u0022\n#I @\u0022../src/FsCheck.NUnit/bin/Release/netstandard2.0\u0022\n#r @\u0022../packages/xunit.abstractions/lib/netstandard1.0/xunit.abstractions.dll\u0022\n#r @\u0022../packages/xunit.extensibility.core/lib/netstandard1.1/xunit.core.dll\u0022\n#r @\u0022../packages/xunit.extensibility.execution/lib/netstandard1.1/xunit.execution.dotnet.dll\u0022\n#r @\u0022../packages/NUnit/lib/netstandard2.0/nunit.framework.dll\u0022\n#r \u0022FsCheck\u0022\n#r \u0022FsCheck.Xunit\u0022\n#r \u0022FsCheck.NUnit\u0022\n\nopen FsCheck\nopen System\n\n(**\n# Running tests\n\nThis section describes the various ways in which you can run FsCheck tests:\n\n* FsCheck has a built-in test runner that is easy to invoke from F#/C# Interactive, commandline program or any test framework. \nIt writes the result of tests to standard output, and you can configure the FsCheck runner to throw an exception on test failure\nto signal the failure to whichever test runner you use.\n\n* FsCheck.Xunit integrates FsCheck with xUnit.NET to allow you to specify properties in a terse way. Tests written\nthis way look like native xUnit.NET tests, except they can take arguments.\n\n* FsCheck.NUnit integrates FsCheck with NUnit to allow you to specify properties in a terse way. Tests written\nthis way look like native NUnit tests, except they can take arguments.\n\n* FsCheck allows you to register an IRunner implementation that it calls on each outcome and each individual test it runs. This allows\na tighter integration with a specific test framework, and offers more control over printing of results.\n\n## Using the built-in test runner\n\n### Running a single property from an fsx/csx file or a command line runner\n\nFrom F# the preferred way of running a property is to use the methods on \u0060Check\u0060; for C# the preferred way is to use the extension\nmethods on the \u0060Property\u0060 type.\n\n\u0060Check.One\u0060 or \u0060\u003Cproperty.Check\u003E\u0060 runs the tests for a single property. It takes as argument an instance of the \u0060Config\u0060 type\nor \u0060Configuration\u0060 type respectively, which allows you to configure many aspects of how the FsCheck test runner works, \namong others the size of the test data and the random seed used (so you can reproduce a run). The \u0060Config\u0060 type is an F# \nrecord type so is the preferred way to use from F#; for other languages \u0060Configuration\u0060 is a mutable\nversion of it so is easier to use.\n\nMost of the methods on \u0060Check\u0060 and the extension methods like \u0060QuickCheck()\u0060 are a short-hand for running a test with a particular configuration. For example, \u0060Check.Quick\u0060 \nis equivalent to \u0060Check.One(Config.Quick, \u003Cproperty\u003E)\u0060; respectively \u0060\u003Cproperty\u003E.QuickCheck()\u0060 is a shorthand for \u0060\u003Cproperty\u003E.Check(Configuration.Quick)\u0060.\n\nTake note of \u0060Config(uration).Verbose\u0060 and \u0060Check.Verbose\u0060/\u0060VerboseCheck\u0060. These will print the arguments for each test, and are useful for example if\nyour test loops infinitely on some inputs.\n\nAlso take note of \u0060Check.QuickThrowOnFailure\u0060/\u0060QuickCheckThrowOnFailure()\u0060 and \u0060Check.VerboseThrowOnFailure\u0060/\u0060VerboseThrowOnFailure()\u0060. \nThese are intended to be used from unit tests executed through an existing test runner. They\u0027ll call the FsCheck runner \nand configure it such that is throws on failure; in all frameworks we are aware of this signals that the test has failed \nand so is an easy way to integrate FsCheck tests with unit tests you may already have.\n\nHere is an example of how to run a test with a similar configuration to Quick, but that runs 1000 tests and does not print to\nthe output on success:*)\n\nCheck.One(Config.Quick.WithMaxTest(1000).WithQuietOnSuccess(true), fun _ -\u003E true)\n\n(**\n [lang=csharp, file=../examples/CSharp.DocSnippets/RunningTests.cs,key=configuration]\n\n### Running many properties at once with Check.All\n\nUsually, you\u0027ll write more than one property to test. FsCheck allows you to group together properties as static members of a class: *)\ntype ListProperties =\n static member \u0060\u0060reverse of reverse is original\u0060\u0060 (xs:list\u003Cint\u003E) = List.rev(List.rev xs) = xs\n static member \u0060\u0060reverse is original\u0060\u0060 (xs:list\u003Cint\u003E) = List.rev xs = xs\n(**These can be checked at once using:*)\n\n(***define-output:ListProperties***)\nCheck.QuickAll\u003CListProperties\u003E()\n\n(**FsCheck now also prints the name of each test:*)\n\n(***include-output:ListProperties***)\n\n(**Since all top level functions of a a module are also compiled as static member of a class with the name of the module, \nyou can also use Check.QuickAll to test all the top level functions in a certain module. \nHowever, the type of a module is not directly accessible via F#, so you can use the following trick:*)\n\n(***define-output:ListProperties2***)\nCheck.QuickAll typeof\u003CListProperties\u003E.DeclaringType\n\n(**\nNotice also the counterpart of \u0060Check.Verbose\u0060: \u0060Check.VerboseAll\u0060.\n\n### Running tests using only modules\n\nArbitrary instances are given as static members of classes, and properties can be grouped together \nas static members of classes. Top level let functions are compiled as static member of their \nenclosing module (which is compiled as a class), and so you can simply define your properties and generators as \ntop level let-bound functions, and then register all generators and and all properties at once using the following trick:*)\n\n(***define-output:Marker***)\nlet myprop (i:int) = i \u003E= 0\nlet mygen = ArbMap.defaults |\u003E ArbMap.arbitrary\u003Cint\u003E |\u003E Arb.mapFilter (fun i -\u003E Math.Abs i) (fun i -\u003E i \u003E= 0)\nlet helper = \u0022a string\u0022\nlet private helper\u0027 = true\n\ntype Marker = class end\nlet config = Config.QuickThrowOnFailure.WithArbitrary([typeof\u003CMarker\u003E.DeclaringType])\nCheck.All(config, typeof\u003CMarker\u003E.DeclaringType)\n\n(***include-output:Marker***)\n\n(**\nThe Marker type is just any type defined in the module, to be able to get to the module\u0027s Type. F# offers no way \nto get to a module\u0027s Type directly.\n\nFsCheck determines the intent of the function based on its return type:\n\n* Properties: public functions that return unit, bool, Property or function of any arguments to those types \nor Lazy value of any of those types. So \u0060myprop\u0060 is the only property that is run; \u0060helper\u0027\u0060 also returns bool but is private.\n* Arbitrary instances: return Arbitrary\u003C_\u003E\n\nAll other functions are respectfully ignored. If you have top level functions that return types that FsCheck will \ndo something with, but do not want them checked or registered, just make them private. FsCheck will ignore those functions.\n\n## Using FsCheck.Xunit\n\nTo use the integration install the FsCheck.Xunit nuget package. Then: *)\n\nopen FsCheck\nopen FsCheck.Xunit\n\n(**\nYou can now attribute tests with \u0060PropertyAttribute\u0060 (a subclass of xUnit.NET\u0027s \u0060FactAttribute\u0060). Unlike xUnit.NET\u0027s facts, these \nmethods can take arguments and should return a property. FsCheck will be used to generate and shrink the arguments based on the\ntype and the currently registered generators. \n\nAn FsCheck test fails from xUnit.NET\u0027s perspective if it finds a counter-example, or if the arguments are exhausted. It\npasses when FsCheck can execute 100 tests (or whatever the configured number of tests is) succesfully.\n\nThe \u0060PropertyAttribute\u0060 allows you to customize how FsCheck will run for that\nmethod, similar to how you would use the \u0060Config\u0060 type otherwise. For example:*)\n\n[\u003CProperty\u003E]\nlet \u0060\u0060abs(v) % k equals abs(v % k)\u0060\u0060 v (NonZeroInt k) = \n (abs v) % k = abs(v % k)\n\n(**\nLikely one of the most useful configuration options of \u0060PropertyAttribute\u0060 is the ability to register or override an \u0060Arbitrary\u0060\ninstance just for that test method. You can also use the \u0060PropertiesAttribute\u0060 (note the plural form) to set custom configuration\noptions per class, per module, or per assembly. For example:*)\n\ntype Positive =\n static member Double() =\n ArbMap.defaults\n |\u003E ArbMap.arbitrary\u003Cfloat\u003E\n |\u003E Arb.mapFilter abs (fun t -\u003E t \u003E 0.0)\n\ntype Negative =\n static member Double() =\n ArbMap.defaults\n |\u003E ArbMap.arbitrary\u003Cfloat\u003E\n |\u003E Arb.mapFilter (abs \u003E\u003E ((-) 0.0)) (fun t -\u003E t \u003C 0.0)\n\ntype Zero =\n static member Double() =\n 0.0\n |\u003E Gen.constant\n |\u003E Arb.fromGen\n\n[\u003Cassembly: Properties( Arbitrary = [| typeof\u003CZero\u003E |] )\u003E] do()\n\nmodule ModuleWithoutProperties =\n\n [\u003CProperty\u003E]\n let \u0060\u0060should use Arb instances from assembly\u0060\u0060(underTest:float) =\n underTest = 0.0\n\n [\u003CProperty( Arbitrary=[| typeof\u003CPositive\u003E |] )\u003E]\n let \u0060\u0060should use Arb instance on method\u0060\u0060(underTest:float) =\n underTest \u003E 0.0\n\n[\u003CProperties( Arbitrary=[| typeof\u003CNegative\u003E |] )\u003E]\nmodule ModuleWithProperties =\n\n [\u003CProperty\u003E]\n let \u0060\u0060should use Arb instances from enclosing module\u0060\u0060(underTest:float) =\n underTest \u003C 0.0\n\n [\u003CProperty( Arbitrary=[| typeof\u003CPositive\u003E |] )\u003E]\n let \u0060\u0060should use Arb instance on method\u0060\u0060(underTest:float) =\n underTest \u003E 0.0\n\n(**\nUsing \u0060PropertiesAttribute\u0060 and \u0060PropertyAttribute\u0060 you can set any configuration. For example in following module:\n\n* property 1 would use default config \u002B overriden MaxTest = 10 and EndSize = 10 from \u0060Properties\u0060 attribute\n* property 2 would use default config \u002B overriden EndSize = 10 from \u0060Properties\u0060 attribute and MaxTest = 500 from \u0060Property\u0060 attribute\n* property 3 would use default config \u002B overriden MaxTest = 10 and EndSize = 10 from \u0060Properties\u0060 attribute and Replay = \u0022123,456\u0022 from \u0060Property\u0060 attribute \n*)\n\n[\u003CProperties(MaxTest = 10, EndSize = 10)\u003E] \nmodule Properties =\n\n [\u003CProperty\u003E]\n let \u0060\u0060property 1\u0060\u0060 input =\n true\n\n [\u003CProperty(MaxTest = 500)\u003E]\n let \u0060\u0060property 2\u0060\u0060 input =\n true\n\n [\u003CProperty(Replay = \u0022123,456\u0022)\u003E]\n let \u0060\u0060property 3\u0060\u0060 input =\n true\n\n(**\n### Using FsCheck.Xunit with TestDriven.Net\n\n[TestDriven.Net](http://testdriven.net) is a Visual Studio add-in that enables you to easily run a variety of tests\nwhile working with code in the IDE. Out of the box, TestDriven.Net can run tests written with FsCheck.Xunit.\n\nHowever, the user experience may, by default, be slightly less than optimal. TestDriven.Net outputs the state of the\ntest run in an unobtrusive manner, but if test failures occur, it outputs the result of the failing tests to Visual\nStudio\u0027s Output window. If you have Visual Studio configured in such a way that the Output window only appears if there\nactually *is* any output, you may be used to interpret the appearance of the Output window as a test failure.\n\nSince the Output window also appears if anything is written to the console in general, this can produce false\npositives. If you\u0027re accustomed to interpret the appearance of the Output window as a sign of a test failure, it can be\na little jarring that FsCheck by default always reports a bit of output on success.\n\nIf, for that, or other reasons, you want to disable output on success, you can do so:\n*)\n\n[\u003CProperty(QuietOnSuccess = true)\u003E]\nlet \u0060\u0060abs(v) % k equals abs(v % k) \u0060\u0060 v (NonZeroInt k) = \n (abs v) % k = abs(v % k)\n\n(**\nSetting \u0060QuietOnSuccess = true\u0060 only suppresses the output in case of success; in the case of test failures, output\nappears as normal.\n\n### Capturing output when using \u0060FactAttribute\u0060\n\nxUnit 2 doesn\u0027t capture messages written to the console but instead provides \u0060ITestOutputHelper\u0060 to [capture output](https://xunit.github.io/docs/capturing-output.html).\n\u0060ITestOutputHelper\u0060 has a single method \u0060WriteLine\u0060 and xUnit will automatically pass it in as a constructor argument.\nFsCheck.Xunit provides overloads for \u0060Property.QuickCheck\u0060, \u0060Property.QuickCheckThrowOnFailure\u0060, \u0060Property.VerboseCheck\u0060 and \u0060Property.VerboseCheckThrowOnFailure\u0060\nthat you can pass an \u0060ITestOutputHelper\u0060 so that xUnit captures FsCheck messages:\n\n\u0060\u0060\u0060\nusing System;\nusing FsCheck;\nusing FsCheck.Xunit;\nusing Xunit;\nusing Xunit.Abstractions;\n\npublic class Test\n{\n private readonly ITestOutputHelper _TestOutputHelper;\n public Test(ITestOutputHelper testOutputHelper)\n {\n _TestOutputHelper = testOutputHelper;\n }\n\n [Fact]\n public void Test1()\n {\n Prop\n .ForAll(...)\n .VerboseCheckThrowOnFailure(_TestOutputHelper);\n }\n}\n\u0060\u0060\u0060\n*)\n\n(**\n## Using FsCheck.NUnit\n\nTo use the integration with NUnit 3 install the FsCheck.NUnit nuget package.\nMake sure your project(s) has target .NET \u00604.5\u0060 or greater.\nThen open FsCheck.NUnit.\n\nYou can now attribute tests with \u0060PropertyAttribute\u0060 (a subclass of NUnit\u0027s \u0060TestAttribute\u0060). Unlike NUnit tests, these \nmethods can take arguments and should return a property. FsCheck will be used to generate and shrink the arguments based on the\ntype and the currently registered generators. \n\nAn FsCheck test fails from NUnit\u0027s perspective if it finds a counter-example, or if the arguments are exhausted. It\npasses when FsCheck can execute 100 tests (or whatever the configured number of tests is) succesfully.\n\nThe \u0060PropertyAttribute\u0060 allows you to customize how FsCheck will run for that\nmethod, similar to how you would use the \u0060Config\u0060 type otherwise.\n*)\n\nopen FsCheck.NUnit\n\n[\u003CProperty\u003E]\nlet \u0060\u0060Reverse of reverse of a list is the original list \u0060\u0060(xs:list\u003Cint\u003E) =\n List.rev(List.rev xs) = xs\n\n(**\nNote: the NUnit integration doesn\u0027t have the ability, like FsCheck.Xunit, to override \u0060Arbitrary\u0060 instances on a per class\nor per module basis. Otherwise, it is very similar.\n\n## Implementing IRunner \n\n### Example 1: to integrate FsCheck with other unit testing frameworks\n\nThe \u0060Config\u0060 type that can be passed to the \u0060Check.One\u0060 or \u0060Check.All\u0060 methods takes an \u0060IRunner\u0060 as argument. This i\nnterface has the following methods:\n\n* \u0060OnStartFixture\u0060 is called when FsCheck is testing all the methods on a type, before starting any tests.\n* \u0060OnArguments\u0060 is called after every test, passing the implementation the test number, the arguments and the every function. \n* \u0060OnShrink\u0060 is called at every succesful shrink.\n* \u0060OnFinished\u0060 is called with the name of the test and the outcome of the overall test run. This is used in the example below \nto call Assert statements from a particular unit testing framework - allowing FsCheck to integrate easily. You can leverage \nanother unit testing framework\u0027s ability to setup and tear down tests, have a nice graphical runner etc.*)\n\nlet testRunner =\n { new IRunner with\n member __.OnStartFixture t = ()\n member __.OnArguments (ntest,args, every) = ()\n member __.OnShrink(args, everyShrink) = ()\n member __.OnFinished(name,testResult) = \n match testResult with \n | TestResult.Passed _ -\u003E () //let the test runner know that the test passed\n | _ -\u003E () // test failed, or other problem. Notify test runner. Runner.onFinishedToString name testResult\n }\n \nlet withxUnitConfig = Config.Default.WithRunner(testRunner)\n\n(**\n### Example 2: to customize printing of generated arguments\n\nBy default, FsCheck prints generated arguments using \u0060sprintf \u0022%A\u0022\u0060, or structured formatting. This usually does what you expect, \ni.e. for primitive types the value, for objects the ToString override and so on. If it does not (A motivating case is \ntesting with COM objects - overriding ToString is not an option and structured formatting does not do anything useful with it), \nyou can use the \u0060label\u0060 combinator to solve this on a per property basis, but a more structured solution can be achieved by \nimplementing \u0060IRunner\u0060. For example:*)\n \nlet formatterRunner formatter =\n { new IRunner with\n member x.OnStartFixture t =\n printf \u0022%s\u0022 (Runner.onStartFixtureToString t)\n member x.OnArguments (ntest,args, every) =\n printf \u0022%s\u0022 (every ntest (args |\u003E List.map formatter))\n member x.OnShrink(args, everyShrink) =\n printf \u0022%s\u0022 (everyShrink (args |\u003E List.map formatter))\n member x.OnFinished(name,testResult) = \n let testResult\u0027 = match testResult with \n | TestResult.Failed (testData,origArgs,shrunkArgs,outCome,seed, seed2, size) -\u003E \n TestResult.Failed (testData,origArgs |\u003E List.map formatter, shrunkArgs |\u003E List.map formatter,outCome,seed, seed2, size)\n | t -\u003E t\n printf \u0022%s\u0022 (Runner.onFinishedToString name testResult\u0027) \n }\n\n(**\n### Using FsCheck.NUnit with TestDriven.Net\n\n[TestDriven.Net](http://testdriven.net) is a Visual Studio add-in that enables you to easily run a variety of tests\nwhile working with code in the IDE. Out of the box, TestDriven.Net can run tests written with FsCheck.NUnit.\n\nHowever, the user experience may, by default, be slightly less than optimal. TestDriven.Net outputs the state of the\ntest run in an unobtrusive manner, but if test failures occur, it outputs the result of the failing tests to Visual\nStudio\u0027s Output window. If you have Visual Studio configured in such a way that the Output window only appears if there\nactually *is* any output, you may be used to interpret the appearance of the Output window as a test failure.\n\nSince the Output window also appears if anything is written to the console in general, this can produce false\npositives. If you\u0027re accustomed to interpret the appearance of the Output window as a sign of a test failure, it can be\na little jarring that FsCheck by default always reports a bit of output on success.\n\nIf, for that, or other reasons, you want to disable output on success, you can do so:\n*)\n\n[\u003CProperty(QuietOnSuccess = true)\u003E]\nlet revUnit (x:char) = \n List.rev [x] = [x]\n\n(**\nSetting \u0060QuietOnSuccess = true\u0060 only suppresses the output in case of success; in the case of test failures, output\nappears as normal.\n*)"},{"uri":"https://fscheck.github.io/FsCheck/StatefulTestingNew.html","title":"Model-based Testing (Experimental)\r\n","content":"(*** hide ***)\n#r @\u0022../src/FsCheck/bin/Release/netstandard2.0/FsCheck.dll\u0022\nopen FsCheck\nopen FsCheck.FSharp\nopen FsCheck.Experimental\nopen System\n\n(**\n# Model-based Testing (Experimental)\n\nThere is also a newer, experimental interface to do model-based testing.\n\n*Caveat: since this is in the FsCheck.Experimental namespace for now, the rules of semantic versioning do \nnot apply to this particular part of the API. In other words, minor version releases may break your code.*\n\nLet\u0027s look at the following simple class, which has an artificial bug:*)\n\ntype Counter(?initial:int) =\n let mutable n = defaultArg initial 0\n member __.Inc() = \n //silly bug\n if n \u003C= 3 then n \u003C- n \u002B 1 else n \u003C- n \u002B 2\n n\n member __.Dec() = if n \u003C= 0 then failwithf \u0022Precondition fail\u0022 else n \u003C- n - 1; n\n member __.Reset() = n \u003C- 0\n override __.ToString() = sprintf \u0022Counter = %i\u0022 n\n\n(**\nAs a model to test this class we can use an int value which is an abstraction of the object\u0027s internal state. The\nidea is that each operation on the class (in this case, Inc, Dec and Reset) affects both the model object and the actual object, and \nafter each such operation, the model and the actual instance should still be equivalent.\n\nWith this idea in mind, you can write a specification of the Counter class using an int model as follows:*)\n\nlet spec =\n let inc = \n { new Operation\u003CCounter,int\u003E() with\n member __.Run m = m \u002B 1\n member __.Check (c,m) = \n let res = c.Inc() \n m = res \n |\u003E Prop.label (sprintf \u0022Inc: model = %i, actual = %i\u0022 m res)\n override __.ToString() = \u0022inc\u0022}\n let dec = \n { new Operation\u003CCounter,int\u003E() with\n member __.Run m = m - 1\n override __.Pre m = \n m \u003E 0\n member __.Check (c,m) = \n let res = c.Dec()\n m = res \n |\u003E Prop.label (sprintf \u0022Dec: model = %i, actual = %i\u0022 m res)\n override __.ToString() = \u0022dec\u0022}\n let create initialValue = \n { new Setup\u003CCounter,int\u003E() with\n member __.Actual() = new Counter(initialValue)\n member __.Model() = initialValue }\n { new Machine\u003CCounter,int\u003E() with\n member __.Setup = Gen.choose (0,3) |\u003E Gen.map create |\u003E Arb.fromGen\n member __.Next _ = Gen.elements [ inc; dec ] }\n\n(**\nLet\u0027s break this down a bit. A specification is put together as an object that is a subtype of the abstract class \u0060Machine\u003C\u0027TypeUnderTest,\u0027ModelType\u003E\u0060. \nWhat you\u0027re actually defining is a state machine which can simultaneously apply operations, or state transitions, to the actual system\nunder test (in this case, a simple object) and a model of the system under test.\n\nThe methods you override on \u0060Machine\u0060 are \u0060Setup\u0060, \u0060Next\u0060, and optionally \u0060TearDown\u0060. \n\n\u0060Machine.Setup\u0060 is a property that returns an \u0060Arbitrary\u0060 instance that generates (and optionally shrinks) a \u0060Setup\u003C\u0027TypeUnderTest, \u0027ModelType\u003E\u0060 object. This in turn has two methods\nto override: \u0060Actual()\u0060 which should return a new, fresh instance of the system under test every time it is called, and \u0060Model()\u0060 which should return the corresponding\ninstance of the model object each time it is called. In the example, there is only one subclass of \u0060Setup\u003C\u0027Counter,int\u003E\u0060 (in more complex cases, there might be more). Our\n\u0060Setup\u0060 instance takes as argument the initial counter value, and returns a fresh \u0060Counter\u0060 as the SUT. The model is in this case simply the initial value.\n\n\u0060Machine.Next\u0060 is a method that takes a model and generates the possible operations that are possible from the state represented by the model. Each operation\nis represented by an \u0060Operation\u0060 subclass. \n\n\u0060Operation\u0060 has three methods to override: \u0060Run\u0060, \u0060Check\u0060 and optionally \u0060Pre\u0060. \u0060Pre\u0060 takes a model and returns true\nif and only if this operation can execute on a model in that state - in other words it checks if the precondition for the operation is satisfied. Note that\n\u0060Machine.Next\u0060 can also return a reduced set of operations based on the model, which is more efficient, but the preconditions are checked regardless for each \noperation \u0060Next\u0060 generates. \n\n\u0060Run\u0060 takes a model and returns the new model which is the result of applying this operation to the model. \u0060Check\u0060 then takes the new model (as returned from \u0060Run\u0060),\napplies the operation to the actual system under test, and checks whether the result of the SUT matches with the model. The return type of \u0060Check\u0060 is Property so\nyou can use the usual FsCheck \u0060Prop\u0060 methods to implement this method.\n\nIn the example above there are only two operations that we\u0027re checking: \u0060Inc\u0060 and \u0060Dec\u0060. The \u0060Run\u0060 methods respectively increase and decrease the model. \u0060Check\u0060\ncalls \u0060Inc()\u0060 or \u0060Dec()\u0060 on the \u0060Counter\u0060 instance, and checks that after that the model counter is equal to the real \u0060Counter\u0060. \u0060Dec\u0060 in addition has a (quite\nsilly, for demonstration purposes) precondition that the value should be strictly greater than 0 - if we run this machine our \u0060Counter\u0060 throws if we call \u0060Dec\u0060 \nso when we run this specification we can check that FsCheck does the right thing here (testing the test library, very meta...)\n\nWe also override ToString in each \u0060Operation\u0060 so that counter-examples can be printed.\n\nA specification can be checked as follows:*)\n\n(***define-output:spec***)\nCheck.Quick (StateMachine.toProperty spec)\n\n(***include-output:spec***)\n\n(**\nNotice that not only has FsCheck found our \u0027bug\u0027, it has also produced the minimal sequence of operations that leads to it.\n\nBut what has actually happened? Using the generators from the \u0060Machine\u0060 methods, FsCheck tries to generate a random sequence of operations, for example: \n\n\u0060\u0060\u0060\n{Setup = (0, Setup Counter);\n Operations =\n [(inc, 1); (dec, 0); (inc, 1); (inc, 2); (inc, 3); (inc, 4); (inc, 5);\n (dec, 4); (dec, 3)];\n TearDown = TearDown Counter;}\n\u0060\u0060\u0060\n\nYou can read this as a trace of the operations: the counter started off in state \u00600\u0060, then using operation \u0060inc\u0060 when to state \u00601\u0060, then using operation \u0060dec\u0060\nwent to state \u00600\u0060 and so on.\n\nThis sequence is first generated using the model only, i.e. no operations are actually applied to any \u0060Counter\u0060 objects. After generating a full trace, the operations\nare actually applied to the system under test, using the \u0060Operation.Check\u0060 methods of the various \u0060Operation\u0060 objects.\n\nIf a failing test is found, FsCheck will attempt to remove operations from the sequence of operations, as long as the test still fails. So in the example above,\nalthough the original sequence contains a few superfluous operations, FsCheck normally finds a shorter if not the shortest sequence that leads to the failure.\n\nFinal tip: make the model class immutable. This makes it easier to reason about the model and the operations on it, and it also makes it easier to write the \u0060Check\u0060 methods.\nIf the model is mutable, you MUST make sure that the result of \u0060Run\u0060 is a new instance of the model that you don\u0027t modify later on. FsCheck captures these results\nduring the test run and during shrinking, and relies on them not changing.\n*)"},{"uri":"https://fscheck.github.io/FsCheck/TestData.html","title":"Test data: generators, shrinkers and Arbitrary instances\r\n","content":"(*** hide ***)\n#I @\u0022../src/FsCheck/bin/Release/netstandard2.0\u0022\n#r @\u0022FsCheck\u0022\nopen FsCheck\nopen FsCheck.FSharp\nopen System\n\n(**\n# Test data: generators, shrinkers and Arbitrary instances\n\nTest data is produced by test data generators. FsCheck defines default \ngenerators for some often used types, but you can use your own, and \nwill need to define your own generators for any new types you introduce.\n\nGenerators have types of the form \u0060Gen\u003C\u0027a\u003E\u0060; this is a generator for values \nof type a. To build your own generators in F#, a computation expression \ncalled \u0060gen\u0060 is provided by FsCheck, and all the functions in the \u0060Gen\u0060 module are at your disposal. \nFor C#, there are some LINQ methods you can use (select, where) and a number of methods on the \u0060Gen\u0060 class.\nThe name for the methods in F# and C# are largely the same except for casing.\n\nShrinkers have types of the form \u0060\u0027a -\u003E seq\u003C\u0027a\u003E\u0060 aka \u0060Func\u003CT,IEnumerable\u003CT\u003E\u003E\u0060; given a value, a shrinker \nproduces a sequence of values that are (in some way) smaller than the given value. \nIf FsCheck finds a set of values that falsify a given property, it will try \nto make that value smaller than the original (random) value by getting the \nshrinks for the value and trying each one in turn to check that the property \nis still false. If it is, the smaller value becomes the new counter example \nand the shrinking process continues with that value.\n\nShrinkers have no special support from FsCheck - this is not needed, \nsince you have all you need in \u0060seq\u0060 computation expressions and the \u0060Seq\u0060 module, or in LINQ and IEnumerable.\n\nFinally, an \u0060Arbitrary\u003C\u0027a\u003E\u0060 instance packages a generator and shrinker together to be used in properties. \nFsCheck also allows you to register Arbitrary instances in a \u0060Type\u0060 to \u0060Arbitrary\u0060 dictionary. \nThis dictionary is used to find an arbitrary instance for properties that have arguments, \nbased on the argument\u0027s type.\n\nArbitrary instances have some helper functions in \u0060Arb\u0060.\n \n## Generators\n\nGenerators are built from the function \u0060choose\u0060, which makes a random choice of \na value from an interval, with a uniform distribution. For example, to make \na random choice between the elements of a list, use*)\n\nlet chooseFromList xs = \n gen { let! i = Gen.choose (0, List.length xs-1) \n return List.item i xs }\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/TestData.cs,key=chooseFrom]\n\n### Choosing between alternatives\n\nA generator may take the form \u0060Gen.oneof \u003Csequence of generators\u003E\u0060\nwhich chooses among the generators in the list with equal probability. For example, \nthis generates a random boolean which is true with probability one half:*)\n\nGen.oneof [ gen { return true }; gen { return false } ]\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/TestData.cs,key=chooseBool]\n\nWe can control the distribution of results using \u0060frequency\u0060\ninstead. \u0060frequency\u0060 chooses a generator from the list randomly, but weighs the probability of \nchoosing each alternative by the factor given. For example, this generates true two thirds of the time.*)\n\nGen.frequency [ (2, gen { return true }); (1, gen { return false })]\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/TestData.cs,key=chooseBool2]\n \n### The size of test data\n\nTest data generators have an implicit size parameter; FsCheck begins by \ngenerating small test cases, and gradually increases the size as testing \nprogresses. Different test data generators interpret the size parameter \nin different ways: some ignore it, while the list generator, for example, \ninterprets it as an upper bound on the length of generated lists. You are \nfree to use it as you wish to control your own test data generators.\n\nYou can obtain the value of the size parameter using \u0060sized\u0060. \u0060sized g\u0060 calls \u0060g\u0060, passing it \nthe current size as a parameter. For example, to generate natural\n numbers in the range 0 to size, use*)\n\nGen.sized \u003C| fun s -\u003E Gen.choose (0,s)\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/TestData.cs,key=sizedInt]\n\nThe purpose of size control is to ensure that test cases are large enough to reveal errors, \nwhile remaining small enough to test fast. Sometimes the default size control does not achieve \nthis. For example, towards the end of a test run arbitrary lists may have up to 50 elements, \nso arbitrary lists of lists may have up to 2500, which is too large for efficient testing. In \nsuch cases it can be useful to modify the size parameter explicitly. You can do so using \n\u0060resize\u0060.\n\n\u0060resize n g\u0060 invokes generator \u0060g\u0060 with size parameter \u0060n\u0060. The size parameter should never be \nnegative. For example, to generate a random matrix it might be appropriate to take the square \nroot of the original size:*)\n\nlet matrix gen = Gen.sized \u003C| fun s -\u003E Gen.resize (s|\u003Efloat|\u003Esqrt|\u003Eint) gen\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/TestData.cs,key=matrixGen]\n\n### Generating recursive data types\n\nGenerators for recursive data types are easy to express using \u0060oneof\u0060 or \u0060frequency\u0060 to choose \nbetween constructors, and F#\u0027s computation expressions or C# LINQ to form a generator for each case. \nThere are also \u0060map\u0060 functions for arity up to 6 to lift constructors and functions into the \u0060Gen\u0060 type. \nFor example, if the type of trees is defined by *)\n\ntype Tree = Leaf of int | Branch of Tree * Tree\n\n(**\nthen a generator for trees might be defined by*)\n\nlet rec unsafeTree() = \n Gen.oneof [ ArbMap.defaults |\u003E ArbMap.generate\u003Cint\u003E |\u003E Gen.map Leaf\n Gen.map2 (fun x y -\u003E Branch (x,y)) (unsafeTree()) (unsafeTree())]\n\n(**\nIn C#, we elide the type because it is quite a bit more verbose than in F# - assume the typical composite\nof having an abstract superclass Tree with two subclasses, one for Leaf and one for Branch. Basically this is\nthe code F# generates for the type definition above. Assuming that, \u0060unsafeTree\u0060 in C# looks like:\n\n [lang=csharp,file=../examples/CSharp.DocSnippets/TestData.cs,key=unsafeTree]\n\nHowever, a recursive generator like this may fail to terminate with a \nStackOverflowException, or produce very large results. To avoid this, \nrecursive generators should always use the size control mechanism:*)\n\nlet tree =\n let rec tree\u0027 s = \n match s with\n | 0 -\u003E ArbMap.defaults |\u003E ArbMap.generate\u003Cint\u003E |\u003E Gen.map Leaf\n | n when n\u003E0 -\u003E \n let subtree = tree\u0027 (n/2)\n Gen.oneof [ ArbMap.defaults |\u003E ArbMap.generate\u003Cint\u003E |\u003E Gen.map Leaf\n Gen.map2 (fun x y -\u003E Branch (x,y)) subtree subtree]\n | _ -\u003E invalidArg \u0022s\u0022 \u0022Only positive arguments are allowed\u0022\n Gen.sized tree\u0027\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/TestData.cs,key=safeTree]\n\nNote that\n\n- We guarantee termination by forcing the result to be a leaf when the size is zero. \n- We halve the size at each recursion, so that the size gives an upper bound on the number of nodes in the tree. We are free to interpret the size as we will. \n- The fact that we share the subtree generator between the two branches of a Branch does not mean that we generate the same tree in each case.\n\n \n### Useful Generator Combinators\n\nIf \u0060g\u0060 is a generator for type \u0060t\u0060, then \n\n- \u0060two g\u0060 generates a pair of t\u0027s, \n- \u0060three g\u0060 generates a triple of t\u0027s, \n- \u0060four g\u0060 generates a quadruple of t\u0027s, \n- If xs is a list, then \u0060elements xs\u0060 generates an arbitrary element of xs.\n- If xs is a list, then \u0060growingElements xs\u0060 generates an arbitrary element among an initial segment of xs. The size of this initial segment increases with the size parameter.\n- \u0060listOfLength n g\u0060 generates a list of exactly n t\u0027s. \n- \u0060listOf g\u0060 generates a list of t\u0027s whose length is determined by the size parameter\n- \u0060nonEmptyListOf g\u0060 generates a non-empty list of t\u0027s whose length is determined by the size parameter.\n- \u0060constant v\u0060 generates the value v.\n- \u0060where p g\u0060 or \u0060filter p g\u0060 generates t\u0027s that satisfy the predicate p. Make sure there is a high chance that the predicate is satisfied.\n- \u0060tryWhere p g\u0060 or \u0060tryFilter p g\u0060 generates Some t\u0027s that satisfy the predicate p, and None if none are found. (After \u0027trying hard\u0027)\n- If xs is a sequence, then \u0060shuffle xs\u0060 generates a random permutation of xs.\n\nAll the generator combinators are functions on the Gen module. In C#, the names are the same just capitalized differently.\n\n### Generator examples\n\nThe following examples use \u0060Gen.sample\u0060 in order to show example output. In\ngeneral, you shouldn\u0027t use \u0060Gen.sample\u0060 when writing properties, but it can be\nhelpful when developing or troubleshooting a useful custom generator.\n\nPlease be aware that due to the non-deterministic nature of FsCheck, the output\nof calling \u0060Gen.sample\u0060 will, in most cases, differ between calls.\n\nThe \u0060Gen.sampleWithSize\u0060 function takes two arguments, in addition to the generator\nfrom which it samples. The first argument is the [size](#The-size-of-test-data)\nof the generated data. Some generators (like \u0060Gen.constant\u0060 and \u0060Gen.elements\u0060)\ndon\u0027t use the \u0060size\u0060 argument. For these generators, any integer value will do.\n\nThe second argument is the number of sample values to generate. Most examples\nbelow use \u0060Gen.sample\u0060 to generate a small list of example values, for example\na list of ten generated values.\n\n#### Constant\n\nThe \u0060Gen.constant\u0060 function is perhaps the simplest, and easiest, generator to\nunderstand. Even though it\u0027s part of a system that generates random values,\nthis particular generator always returns the same value:*)\n\n(***define-output:ConstantExample***)\nGen.constant (1, \u0022Foo\u0022) |\u003E Gen.sampleWithSize 0 10\n\n(**In this example, the constant is a complex value (a tuple); it can also be a\nsimple value, as for example a string or an integer. Since \u0060Gen.constant\u0060\ndoesn\u0027t rely on the \u0060size\u0060 argument, it\u0027s \u00600\u0060 in this example, but any value\nwould do; it wouldn\u0027t change the result. As you can see from the return value,\nall singular elements returned is the same tuple.*)\n\n(***include-it:ConstantExample***)\n\n(**Since the purpose of FsCheck is to generate random values, you shouldn\u0027t\nneed to use \u0060Gen.constant\u0060 often. Still, it can come in handy if you need to\nkeep the value of a particular type constant while you vary other values.\n\n#### Choose\n\nYou can use the \u0060Gen.choose\u0060 function to create a generator of singular integer\nvalues between a minimum and maximum value, both inclusive:*)\n\n(***define-output:ChooseBetweenZeroAndNineExample***)\nGen.choose (0, 9) |\u003E Gen.sampleWithSize 0 10\n\n(**This example generates a single integer value between 0 and 9. Since\n\u0060Gen.choose\u0060 doesn\u0027t rely on the \u0060size\u0060 argument, it\u0027s \u00600\u0060 in this example,\nbut any value would do; it wouldn\u0027t change the result.\n\nWhile \u0060Gen.choose (0, 9)\u0060 generates a single integer value, \u0060Gen.sample 0 10\u0060\ngenerates 10 sample values:*)\n\n(***include-it:ChooseBetweenZeroAndNineExample***)\n\n(**If you supply values in the \u0027wrong order\u0027, \u0060Gen.choose\u0060 will follow\n[Postel\u0027s law](https://en.wikipedia.org/wiki/Robustness_principle) and \u0027know\nwhat you meant\u0027:*)\n\n(***define-output:ChooseWhenLowIsHigherThanHigh***)\nGen.choose (99, 42) |\u003E Gen.sampleWithSize 0 10\n\n(**In this example, the first value is greater than the second value, but\n\u0060Gen.choose\u0060 will happily interpret this as a range, and produce values between\n42 and 99, both included:*)\n\n(***include-it:ChooseWhenLowIsHigherThanHigh***)\n\n(**Since both values are included, if you set both to the same value, you\u0027ll\neffectively constrain the generator to that single value, and it\u0027ll behave like\n\u0060Gen.constant\u0060.\n\n#### Elements\n\nYou can use the \u0060Gen.elements\u0060 function to create a generator of singular\nvalues drawn from a collection of possible values. The collection is inclusive,\nwhich means that both the first and last element, as well as all elements\nbetween, can be drawn.\n\nIn the following example, a list of arbitrary integers define the collection of\npossible values. The result is a generator that creates \u0060int\u0060 values guaranteed\nto be one of these values. Since \u0060Gen.elements\u0060 doesn\u0027t rely on the \u0060size\u0060\nargument, it\u0027s \u00600\u0060 in this example, but any value would do; it wouldn\u0027t change\nthe result.*)\n\n(***define-output:ElementsExample***)\nGen.elements [42; 1337; 7; -100; 1453; -273] |\u003E Gen.sampleWithSize 0 10\n\n(**The result of this expression is a list of ten sample values. Each value is\na single integer drawn from the collection of numbers:*)\n\n(***include-it:ElementsExample***)\n\n(**All elements are equally likely to be drawn from the collection; we say that\nthe random function has a uniform distribution. One easy way to affect the\ndistribution is to put more than one identical element into the collection:*)\n\n(***define-output:SkewedElementsExample***)\nGen.elements [\u0022foo\u0022; \u0022foo\u0022; \u0022bar\u0022] |\u003E Gen.sampleWithSize 0 10\n\n(**In the above example, the value \u0060\u0022foo\u0022\u0060 appears twice, so is twice as likely\nto be drawn from the collection:*)\n\n(***include-it:SkewedElementsExample***)\n\n(**The above examples all use \u0060list\u0060 values as input, but you can use any \u0060seq\u0060\nexpression, including \u0060list\u0060 and \u0060array\u0060 values, as long as the sequence is\nfinite.\n\n#### GrowingElements\n\nEssentially \u0060Gen.growingElements\u0060 is like \u0060Gen.elements\u0060 but also taking \u0060size\u0060 into account.\n\nYou can use the \u0060Gen.growingElements\u0060 function to create a generator of singular\nvalues drawn *among an initial segment* of possible values. The size of this\ninitial segment increases with the \u0060size\u0060 parameter.\n\nIn the following example, a list of ten characters define the collection of\npossible values. The result is a generator that creates \u0060char\u0060 values guaranteed\nto be one of these values. Since \u0060Gen.growingElements\u0060 relies on the \u0060size\u0060\nargument, it\u0027s \u00603\u0060 in this example, which means only values from the segment\n\u0060[\u0027a\u0027; \u0027b\u0027; \u0027c\u0027]\u0060 will be returned.*)\n\n(***define-output:GrowingElementsExample***)\nGen.growingElements [\u0027a\u0027; \u0027b\u0027; \u0027c\u0027; \u0027d\u0027; \u0027e\u0027; \u0027f\u0027; \u0027g\u0027; \u0027h\u0027; \u0027i\u0027; \u0027j\u0027] |\u003E Gen.sampleWithSize 3 10\n\n(**The result of this expression is a list of ten sample values. Each value is\na single character drawn from the segment \u0060[\u0027a\u0027; \u0027b\u0027; \u0027c\u0027]\u0060:*)\n\n(***include-it:GrowingElementsExample***)\n\n(**Let\u0027s run \u0060Gen.growingElements\u0060 again, with the same input but with size \u00607\u0060:*)\n\n(***define-output:GrowingElementsAnotherExample***)\nGen.growingElements [\u0027a\u0027; \u0027b\u0027; \u0027c\u0027; \u0027d\u0027; \u0027e\u0027; \u0027f\u0027; \u0027g\u0027; \u0027h\u0027; \u0027i\u0027; \u0027j\u0027] |\u003E Gen.sampleWithSize 7 10\n\n(**The result of this expression is a list of ten sample values. Each value is\nnow a single character drawn from the segment \u0060[\u0027a\u0027; \u0027b\u0027; \u0027c\u0027; \u0027d\u0027; \u0027e\u0027; \u0027f\u0027; \u0027g\u0027]\u0060:*)\n\n(***include-it:GrowingElementsAnotherExample***)\n\n(**The above examples all use \u0060list\u0060 values as input, but you can use any \u0060seq\u0060\nexpression, including \u0060list\u0060 and \u0060array\u0060 values, as long as the sequence is\nfinite.\n\n#### Map\n\nSometimes, you need to use a generator of one type in order to create a\ngenerator of another type. For instance, you may need a \u0060byte\u0060 value between 0\nand 127. That sounds just like a job for \u0060Gen.choose\u0060, but unfortunately,\n\u0060Gen.choose (0, 127)\u0060 is a \u0060Gen\u003Cint\u003E\u0060, and not a \u0060Gen\u003Cbyte\u003E\u0060. One way to\nproduce a \u0060Gen\u003Cbyte\u003E\u0060 from a \u0060Gen\u003Cint\u003E\u0060 is to use \u0060Gen.map\u0060:*)\n\n(***define-output:IntToByteMapExample***)\nGen.choose (0, 127) |\u003E Gen.map byte |\u003E Gen.sampleWithSize 0 10\n\n(**This example uses the \u0060byte\u0060 _function_ to cast any \u0060int\u0060 created by\n\u0060Gen.choose (0, 127)\u0060 to a \u0060byte\u0060 value:*)\n\n(***include-it:IntToByteMapExample***)\n\n(**This is only a basic example of the concept of \u0060Gen.map\u0060. In this particular\nexample, you could also have used \u0060Gen.elements [0uy..127uy]\u0060 to achieve the\nsame result without using \u0060Gen.map\u0060, so let\u0027s consider a second\nexample.\n\nAssume that you need to create a date in a particular month; e.g. November\n2019. You can do that by creating an integer for the day of the month, and then\ncombine \u0060Gen.map\u0060 with an anymous function to get the desired date:*)\n\n(***define-output:MapIntToDateExample***)\nGen.choose (1, 30)\n|\u003E Gen.map (fun i -\u003E DateTime(2019, 11, i).ToString \u0022u\u0022)\n|\u003E Gen.sampleWithSize 0 10\n\n(**In this example, the generated \u0060DateTime\u0060 value is immediately formatted as\na \u0060string\u0060, so that the output is more readable:*)\n\n(***include-it:MapIntToDateExample***)\n\n(**This causes the resulting generator to have the type \u0060Gen\u003Cstring\u003E\u0060, but if\nyou omit calling \u0060ToString \u0022u\u0022\u0060, its type would have been \u0060Gen\u003CDateTime\u003E\u0060.\n\n#### Lists\n\nYou can generate lists from individual value generators using \u0060Gen.listOf\u0060,\n\u0060Gen.listOfLength\u0060, and \u0060Gen.nonEmptyListOf\u0060. These functions are\n*combinators*, which means that they don\u0027t generate individual values\nthemselves, but rather use another generator to build values. For instance,\nyou can use \u0060Gen.constant\u0060 to generate lists that all contain the same value:*)\n\n(***define-output:ConstantListOfExample***)\nGen.constant 42 |\u003E Gen.listOf |\u003E Gen.sampleWithSize 1 10\n\n(**This combination uses \u0060Gen.constant 42\u0060 as an individual generator, and then\ngenerates lists containing the the number 42. While the value(s) in the list is\nalways 42, the length of the generated lists varies.*)\n\n(***include-it:ConstantListOfExample***)\n\n(**The length of the generated list is determined by the \u0060size\u0060 argument. In\nthis example, the \u0060size\u0060 argument is \u00601\u0060, so the generated lists are short.\nNote that while there\u0027s a correlation beteen \u0060size\u0060 and the length of the\nlists, you can\u0027t rely on a deterministic length. For that, there\u0027s\n\u0060Gen.listOfLength\u0060:*)\n\n(***define-output:ListOfLengthExample***)\nGen.choose (24, 42) |\u003E Gen.listOfLength 5 |\u003E Gen.sampleWithSize 0 10\n\n(**This example uses \u0060Gen.choose (24, 42)\u0060 in order to generate individual\ninteger values between 24 and 42. It then pipes this generator into\n\u0060Gen.listOfLength 5\u0060 in order to generate lists with exactly five elements:*)\n\n(***include-it:ListOfLengthExample***)\n\n(**Notice that all sample lists have exactly five elements.\n\nYou can also use \u0060Gen.nonEmptyListOf\u0060 to create lists that are guaranteed to\nhave at least one element. Like the other list generators, it uses a\nsingle-value generator to generate its elements:*)\n\n(***define-output:NonEmptyListExample***)\nGen.elements [\u0022foo\u0022; \u0022bar\u0022; \u0022baz\u0022] |\u003E Gen.nonEmptyListOf |\u003E Gen.sampleWithSize 20 4\n\n(**Like \u0060Gen.listOf\u0060, \u0060Gen.nonEmptyListOf\u0060 uses \u0060size\u0060 to control the length\nof the generated lists. They may still be small, but the larger the \u0060size\u0060\nargument, the larger the lists may become.*)\n\n(***include-it:NonEmptyListExample***)\n\n(**In this example, each element is drawn from the small set \u0022foo\u0022, \u0022bar\u0022, and\n\u0022baz\u0022. The lists are guaranteed to have at least a single element, but may be\nlonger.\n\n#### Shuffle\n\nYou can use the \u0060Gen.shuffle\u0060 function to create a generator that generates a\nrandom permutation of a given finite sequence.\n\nIn the following example, the\n[metasyntactic variables](https://en.wikipedia.org/wiki/Metasyntactic_variable)\n\u0022foo\u0022, \u0022bar\u0022, \u0022baz\u0022, and \u0022qux\u0022 define the input sequence:*)\n\n(***define-output:ShuffleExample***)\nGen.shuffle [\u0022foo\u0022; \u0022bar\u0022; \u0022baz\u0022; \u0022qux\u0022] |\u003E Gen.sampleWithSize 0 6\n\n(**Since \u0060Gen.shuffle\u0060 doesn\u0027t rely on the \u0060size\u0060 argument, it\u0027s \u00600\u0060 in this\nexample, but any value would do; it wouldn\u0027t change the result.\n\nThe result of this expression is a list of lists, where each list contains\nthe original input list, but shuffled:*)\n\n(***include-it:ShuffleExample***)\n\n(**The above example uses a \u0060list\u0060 value as input, but you can use any \u0060seq\u0060\nexpression, including \u0060list\u0060 and \u0060array\u0060 values, as long as the sequence is\nfinite.\n\nAll shuffles are equally likely; the input order isn\u0027t excluded, so the\noutput may be the same as the input. Due to the nature of combinatorics, this\nis more likely to happen the smaller the input list is.\n\n#### Tuples\n\nSometimes you need to generate tuples of values. You can use the functions\n\u0060Gen.two\u0060, \u0060Gen.three\u0060, and \u0060Gen.four\u0060 to turn a single-value generator into a\ngenerator of tuples.\n\nImagine that you need to generate two-dimensional points; you may, for\ninstance, be implementing\n[Conway\u0027s Game of Life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life).\nPoints can be modelled as tuples of numbers. If you\u0027re modelling a grid, you\ncan use integers:*)\n\n(***define-output:GenTwoIntegerExample***)\nGen.choose (-100, 100) |\u003E Gen.two |\u003E Gen.sampleWithSize 0 10\n\n(**\u0060Gen.two\u0060 uses a single-value generator to create a generator of two-element\ntuples. This example generates 10 sample points, where each coordinate is\nbetween -100 and 100:*)\n\n(***include-it:GenTwoIntegerExample***)\n\n(**If you want to model a coordinate system in three-dimensional space, you may\ndecide to use floating points instead:*)\n\n(***define-output:GenThreeFloatExample***)\nGen.elements [-10.0..0.01..10.0] |\u003E Gen.three |\u003E Gen.sampleWithSize 0 10\n\n(**In this example, you first use \u0060Gen.elements\u0060 to draw a floating point value\nfrom between -10 and 10, with two decimals; that defines a \u0060Gen\u003Cfloat\u003E\u0060.\nSecond, \u0060Gen.three\u0060 takes that \u0060Gen\u003Cfloat\u003E\u0060 and turns it into a\n\u0060Gen\u003Cfloat * float * float\u003E\u0060:*)\n\n(***include-it:GenThreeFloatExample***)\n\n(**Finally, \u0060Gen.four\u0060 transforms a single-value generator into a generator of\nfour-element tuples. As all the other *combinators* in the \u0060Gen\u0060 module, you\ncan combine it with other functions to define more specific values. Imagine,\nfor instance, that you need to create \u0060System.Version\u0060 values. This type, which\ncaptures a version of something, for example an operating system, or a library,\nmodels version numbers as a composite of four numbers: *major*, *minor*,\n*build*, and *revision* - all integers. One of the constructor overloads of\nthis class takes all four numbers, so you can combine \u0060Gen.four\u0060 with \u0060Gen.map\u0060\nto create Version values:*)\n\n(***define-output:GenFourVersionExample***)\nGen.choose (0, 9)\n|\u003E Gen.four\n|\u003E Gen.map (System.Version \u003E\u003E string)\n|\u003E Gen.sampleWithSize 0 10\n\n(**This example starts with \u0060Gen.choose (0, 9)\u0060 to define a \u0060Gen\u003Cint\u003E\u0060 that\ncreates integer values betwen 0 and 9 (both included). Second, you pipe the\n\u0060Gen\u003Cint\u003E\u0060 value into \u0060Gen.four\u0060, which returns a \u0060Gen\u003Cint * int * int * int\u003E\u0060.\nThird, you can pipe that generator into \u0060Gen.map\u0060, using the constructor\noverload of \u0060Version\u0060 that takes four integers; in F# 4, constructors can be\ntreated as functions, and a constructor with four arguments can be treated as a\nfunction that takes a four-element tuple.*)\n\n(***include-it:GenFourVersionExample***)\n\n(**This example composes the \u0060Version\u0060 constructor with the \u0060string\u0060 function,\nin order to produce a more readable output. The resulting generator has the\ntype \u0060Gen\u003Cstring\u003E\u0060, but if you remove the \u0060string\u0060 composition, the type would\nbe \u0060Gen\u003CVersion\u003E.\u0060\n\n#### Filter\n\nWhile you can use the above generators and combinators to define various custom\nrules for generating values, occasionally you have a requirement where the\neasiest solution is to throw away some generated candidates. \u0060Gen.filter\u0060 gives\nyou that opportunity.\n\nImagine, for example, that you have to create lists with two elements, but with\nthe restriction that the two elements must be different. One way to do that\ncould be to first generate a pair of values, and then use \u0060Gen.filter\u0060 to\nremove all pairs where the elements are equal. Subsequently, you can use\n\u0060Gen.map\u0060 to convert the pair to a list:*)\n\n(***define-output:GenFilterExample***)\nGen.choose (1, 100)\n|\u003E Gen.two\n|\u003E Gen.filter (fun (x, y) -\u003E x \u003C\u003E y)\n|\u003E Gen.map (fun (x, y) -\u003E [x; y])\n|\u003E Gen.sampleWithSize 0 10\n\n(**This expression generates 10 sample lists, each containing two different\nnumbers:*)\n\n(***include-it:GenFilterExample***)\n\n(**When using \u0060Gen.filter\u0060, be sure to provide a predicate with a high chance\nof returning \u0060true\u0060. If the predicate discards \u0027too many\u0027 candidates, it may\ncause tests to run slower, or to not terminate at all. If your filter is\naggressive, consider using \u0060Gen.tryFilter\u0060 instead of \u0060Gen.filter\u0060.\n \n## Default Generators and Shrinkers based on type\n\nFsCheck defines default test data generators and shrinkers for some often used types, for example\nunit, bool, byte, int, float, char, string, DateTime, lists, array 1D and 2D, Set, Map, objects and \nfunctions from and to any of the above. Furthermore, by using reflection, FsCheck can derive \ndefault implementations of record types, discriminated unions, tuples, enums and basic classes in terms \nof any primitive types that are defined (either in FsCheck or by you).\n\nYou do not need to define these explicity for every property: FsCheck can provide a property with \nappropriate generators and shrinkers for all of the property\u0027s arguments, if it knows them or \ncan derive them. Usually you can let type inference do the job of finding out these types \nbased on your properties. However if you want to coerce FsCheck to use a particular generator \nand shrinker, you can do so by providing the appropriate type annotations.\n\nFsCheck packages a generator and shrinker for a particular type in an \u0060Arbitrary\u0060 type. You can \nprovide FsCheck with an Arbitrary instance for your own types, by defining static members that \nreturn an instance of a subclass of \u0060Arbitrary\u003C\u0027a\u003E\u0060:*)\n\ntype MyGenerators =\n static member Tree() =\n {new Arbitrary\u003CTree\u003E() with\n override _.Generator = tree\n override _.Shrinker _ = Seq.empty }\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/TestData.cs,key=MyGenerators]\n\nReplace the \u0060\u0027a\u0060 by the particular type you are defining an Arbitary instance for. \nOnly the \u0060Generator\u0060 method needs to be defined; \u0060Shrinker\u0060 by default returns the empty \nsequence which means no shrinking will be done for this type).\n\nAs the F# code shows, you can create your own subclass of Arbitrary and return that, or you can use one of the \u0060Arb.from\u0060\nmethods or functions.\n\nNow, to make FsCheck aware of all Arbitrary instances in this class, you can add it to the Config:*)\n\nlet myConfig = Config.Quick.WithArbitrary([ typeof\u003CMyGenerators\u003E ])\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/TestData.cs,key=register]\n\nIf you use this config, FsCheck now knows about \u0060Tree\u0060 types, and can not only generate Tree values, but also e.g. lists, tuples and \noption values containing Trees:*)\n\n(***define-output:RevRevTree***)\nlet revRevTree (xs:list\u003CTree\u003E) = \n List.rev(List.rev xs) = xs\nCheck.One(myConfig, revRevTree)\n\n(***include-output:RevRevTree***)\n\n(**\nTo generate types with a generic type argument, e.g.*)\n\ntype Box\u003C\u0027a\u003E = Whitebox of \u0027a | Blackbox of \u0027a\n\n(**\nyou can use the same principle - except to write the generator and shrinker you now need an instance for whatever the generic parameter(s) will be\nwhen build the generator. To this end, the methods can take argument of type \u0060Arbitrary\u003C\u0027T\u003E. For example, the class \u0060MyGenerators\u0060 can be extended as follows:*)\n\nlet boxGen\u003C\u0027a\u003E (contents:Arbitrary\u003C\u0027a\u003E) : Gen\u003CBox\u003C\u0027a\u003E\u003E = \n gen { let! a = contents.Generator\n return! Gen.elements [ Whitebox a; Blackbox a] }\n\ntype MyTreeGenerator =\n static member Tree() =\n {new Arbitrary\u003CTree\u003E() with\n override x.Generator = tree\n override x.Shrinker t = Seq.empty }\n static member Box(contents:Arbitrary\u003C\u0027a\u003E) = contents |\u003E boxGen |\u003E Arb.fromGen\n\n(**\nNow, when FsCheck examines the static methods on \u0060MyTreeGenerator\u0060, it will \u0022inject\u0022 the necessary \u0060Arbitrary\u0060 instance. For example,\nif we request to generate a \u0060Box\u003Cint\u003E\u0060, FsCheck first finds the \u0060Arbitrary\u0060 instance for \u0060int\u0060, and then calls \u0060MyTreeGenerator.Box\u0060 with\nthat instance to get an \u0060Arbitrary\u0060 instance for \u0060Box\u003Cint\u003E\u0060. You can think of this as a parameter-driven dependency injection.\n\nThis allows you to define generic generators recursively. Have a look at the FsCheck source for examples of default Arbitrary implementations \nto get a feeling of how to write such Arbitrary instances. The Arb module or class should help you with this task as well.\n\nNow, the following property can be checked:*)\n\n(***define-output:RevRevBox***)\nlet revRevBox (xs:list\u003CBox\u003Cint\u003E\u003E) = \n List.rev(List.rev xs) = xs\nCheck.One(Config.Quick.WithArbitrary([typeof\u003CMyTreeGenerator\u003E]), revRevBox)\n\n(***include-output:RevRevBox***)\n\n(**\nNote that the class needs not be tagged with attributes in any way. FsCheck determines the type of \nthe generator by the return type of each static member.\n\nAlso note that in this case we actually didn\u0027t need to write a generator or shrinker: FsCheck can \nderive suitable instances using reflection for discriminated unions, record types and enums.\n\n### Notes about the default Generators and Shrinkers\n\nMost of the default Arbitrary instances are documented with xml comments that can be discovered via IntelliSense.\nHowever, there are some important things to notice that are listed here to avoid much duplicating comments.\n\n- Most of the default sized generators of the number-like types produce the uniformly distributed values in the ranges specified in the comments.\n- The same thing with the default DoNotSize generators of the number-like types except Decimal.\n- Most of the default generators of the collection types are just \u0022wrappers\u0022 around the F# list. Thus, you can assume that they are generated and shrinked the same way.\n \n## Useful methods on the Arb module\n\n- \u0060Arb.from\u003C\u0027a\u003E\u0060 returns the registered Arbitrary instance for the given type \u0027a\n- \u0060Arb.fromGen\u0060 makes a new Arbitrary instance from just a given generator - the shrinker return the empty sequence\n- \u0060Arb.fromGenShrink\u0060 make a new Arbitrary instance from a given generator and shrinker. This is equivalent to implementing Arbitrary yourself, but may be shorter.\n- \u0060Arb.generate\u003C\u0027a\u003E\u0060 returns the generator of the registered Arbitrary instance for the given type \u0027a\n- \u0060Arb.shrink\u0060 return the immediate shrinks of the registered Arbitrary instance for the given value\n- \u0060Arb.convert\u0060 given conversion functions to (\u0027a -\u003E\u0027b) and from (\u0027b -\u003E\u0027a), converts an Arbitrary\u003C\u0027a\u003E instance to an Arbitrary\u003C\u0027b\u003E\n- \u0060Arb.filter\u0060 filters the generator and shrinker for a given Arbitrary instance to contain only those values that match with the given filter function\n- \u0060Arb.mapFilter\u0060 maps the generator and filter the shrinkers for a given Arbitrary instance. Mapping the generator is sometimes faster, e.g. for a PositiveInt it is faster to take the absolute value than to filter the negative values.\n- \u0060Arb.Default\u0060 is a type that contains all the default Arbitrary instances as they are shipped and registerd by FsCheck by default. This is useful when you override a default generator - typically this is because you want to filter certain values from it, and then you need to be able to refer to the default generator in your overriding generator.*)"},{"uri":"https://fscheck.github.io/FsCheck/TipsAndTricks.html","title":"Tips and Tricks\r\n","content":"(*** hide ***)\n#I @\u0022../src/FsCheck/bin/Release/netstandard2.0\u0022\n#r @\u0022FsCheck\u0022\nopen FsCheck\nopen FsCheck.FSharp\nopen System\n\n(**\n# Tips and Tricks\n \n## Properties of functions\n\nPerhaps surprisingly, FsCheck can generate random functions, \u0060Func\u0060 and \u0060Action\u0060s. As a result, it can check properties of \nfunctions. For example, we can check associativity of function composition as follows:*)\n\n(***define-output:associativity***)\nlet associativity (x:int) (f:int-\u003Efloat,g:float-\u003Echar,h:char-\u003Eint) = ((f \u003E\u003E g) \u003E\u003E h) x = (f \u003E\u003E (g \u003E\u003E h)) x\nCheck.Quick associativity\n\n(***include-output:associativity***)\n\n(**\nFsCheck can generate all functions with a target type that it can generate. In addition, the functions are pure and total -\nthe former means that if you give a generated function the same value as input, it will keep returning that same value as output,\nno matter how many times you call it. The latter means that the function does not throw any exceptions and always terminates.\n\nIf a counter-example is found, function values will be displayed as \u0060\u003Cfunc\u003E\u0060. However, FsCheck can show \nyou the generated function in more detail, if you ask it to generate a \u0060Function\u0060 type, which has an embedded \u0022real\u0022 function. \nFsCheck can even shrink \u0060Function\u0060s. For example:*)\n\n(***define-output:mapRec***)\nlet mapRec (Fun f) (l:list\u003Cint\u003E) =\n not l.IsEmpty ==\u003E\n lazy (List.map f l = ((*f \u003C|*) List.head l) :: List.map f (List.tail l))\nCheck.Quick mapRec\n\n(***include-output:mapRec***)\n\n(**\nThe type \u0060Function\u003C\u0027a,\u0027b\u003E\u0060 - here deconstructed using the single case active pattern \u0060Fun\u0060 - \nrecords a map of all the arguments it was called with, and the result it produced. \nIn your properties, you can extract the actual function by pattern matching as in the example. \n\u0060Function\u0060 is used to print the function, and also to shrink it.\n \n## Use pattern matching instead of forAll to use custom generators\n\nTo define a generator that generates a subset of the normal range of values for an existing type,\nsay all the even ints, it makes properties more readable if you define a single-case union\ncase, and register a generator for the new type:\n*)\n\n(***define-output:EvenInt***)\ntype EvenInt = EvenInt of int with\n static member op_Explicit(EvenInt i) = i\n\ntype ArbitraryModifiers =\n static member EvenInt() = \n ArbMap.defaults\n |\u003E ArbMap.arbitrary\u003Cint\u003E \n |\u003E Arb.filter (fun i -\u003E i % 2 = 0) \n |\u003E Arb.convert EvenInt int\n \nlet \u0060\u0060generated even ints should be even\u0060\u0060 (EvenInt i) = i % 2 = 0\nCheck.One(Config.Quick.WithArbitrary([typeof\u003CArbitraryModifiers\u003E]), \u0060\u0060generated even ints should be even\u0060\u0060)\n\n(***include-output:EvenInt***)\n\n(**\nIt\u0027s now easy to define custom shrink functions as well.\n\nFsCheck uses this pattern frequently, e.g. \u0060NonNegativeInt\u0060, \u0060PositiveInt\u0060, \u0060StringWithoutNullChars\u0060 etc. See the\ndefault Arbitrary instances on the \u0060Arb.Default\u0060 type.\n\nAlso, for these kinds of generators, the \u0060Arb.filter\u0060, \u0060Arb.convert\u0060 and \u0060Arb.mapFilter\u0060 functions will come in handy.\n \n## An equality comparison that prints the left and right sides of the equality\n\nProperties commonly check for equality. If a test case fails, FsCheck prints the counterexample, but \nsometimes it is useful to print the left and right side of the comparison, especially if you \ndo some complicated calculations with the generated arguments first. To make this easier, you can \ndefine your own labelling equality combinator:*)\n\n(***define-output:testCompare***)\nlet (.=.) left right = left = right |\u003E Prop.label (sprintf \u0022%A = %A\u0022 left right)\n\nlet testCompare (i:int) (j:int) = 2*i\u002B1 .=. 2*j-1\nCheck.Quick testCompare\n\n(***include-output:testCompare***)\n\n(**\nOf course, you can do this for any operator or function that you often use.\n \n## Some ways to run FsCheck tests\n\n* By adding properties and generators to an fsx file in your project. It\u0027s easy to execute, just press \nctrl-a and alt-enter, and the results are displayed in F# Interactive. Be careful when referencing dlls \nthat are built in your solution; Versions of F# Interactive earlier than 3.1.2 will lock those for the remainder of the session, \nand you won\u0027t be able to build until you quit the session. One solution is to include the source files \ninstead of the dlls, but that makes the process slower. Useful for smaller projects. Difficult to debug though.\n* By making a separate console application. Easy to debug, and no annoying locks on assemblies. Your best option \nif you use only FsCheck for testing and your properties span multiple assemblies.\n* By using another unit testing framework. Useful if you have a mixed FsCheck/unit testing approach \n(some things are easier to check using unit tests, and vice versa), and you like a graphical runner. \nDepending on what unit testing framework you use, you may get good integration with Visual Studio for free. Also have a look\nat some of the existing integrations with test runners like Xunit.NET, NUnit, Fuchu.\n\n## Testing mutable types without using Command or StateMachine\n\nFor some relatively simple mutable types you might feel more comfortable just writing straightforward FsCheck properties without\nusing the \u0060Command\u0060 or \u0060StateMachine\u0060 API. This is certainly possible, but for shrinking FsCheck assumes that it can\nre-execute the same test multiple times without the inputs changing. If you call methods or set properties on a generated object\nthat affect its state, this assumption does not hold and you\u0027ll see some weird results.\n\nThe simplest way to work around this is not to write a generator for your mutable object at all, but instead write an FsCheck property\nthat takes all the values necessary to construct the object, and then simply construct the object in the beginning of your test. For example, suppose we want to test\na mutable list:*)\n\nlet testMutableList =\n Prop.forAll (Arb.fromGen(Gen.choose (1,10))) (fun capacity -\u003E \n let underTest = new System.Collections.Generic.List\u003Cint\u003E(capacity)\n Prop.forAll (ArbMap.defaults |\u003E ArbMap.arbitrary\u003Cint[]\u003E) (fun itemsToAdd -\u003E\n underTest.AddRange(itemsToAdd)\n underTest.Count = itemsToAdd.Length))\n\n(**\n [lang=csharp,file=../examples/CSharp.DocSnippets/TipsAndTricks.cs,key=testMutableList]\n\nThis works, as a bonus you get shrinking for free.\n\nIf you do want to write a generator for your mutable type, this can be made to work but if\nyou mutate a generated object during a test, either:\n\n* Disable shrinking, typically by wrapping all types into \u0060DontShrink\u0060; or\n* Clone or otherwise \u0027reset\u0027 the generated mutable object at the beginning or end of every test.\n\n## Replaying a failed test\n\nWhen you have a failed test, it\u0027s often useful for debugging to be able to replay exactly those inputs. For this reason, FsCheck displays the\nseed of its pseudo-random number generator when a test fails. Look for the bit of text that looks like: \u0060(StdGen (1145655947,296144285))\u0060.\n\nTo replay this test, which should have the exact same output, use the \u0060Replay\u0060 field on \u0060Config\u0060:*)\n\nCheck.One(Config.Quick.WithReplay(1145655947UL,296144285UL), fun x -\u003E abs x \u003E= 0)\n\n(**\nIn C#:\n\n [lang=csharp,file=../examples/CSharp.DocSnippets/TipsAndTricks.cs,key=replay]\n*)\n\n(**\n## Checking properties in parallel\n\nFsCheck can evaluate properties in parallel.\nThis feature may be useful to speed-up your cpu-heavy properties and custom arbitraries.\nAlso this is invaluable for running asynchronous propertiess, i.e. when you are doing asynchronous IO inside prop.\nDon\u0027t forget to wrap your property in \u0060Task\u0060 or \u0060Async\u0060 in that case.\n\nTo run a property in parallel, use the \u0060ParallelRunConfig\u0060 field on \u0060Config\u0060:*)\n\nCheck.One(\n Config.Quick.WithParallelRunConfig({ MaxDegreeOfParallelism = System.Environment.ProcessorCount }),\n fun x -\u003E abs x \u003E= 0\n)\n\n(**\n\u0060System.Environment.ProcessorCount\u0060 is a good default for cpu-bound work.\nFor io-bound work it\u0027s usually enough to set \u0060ParallelRunConfig\u0060 to 1.\n*)\n\nCheck.One(\n Config.Verbose.WithParallelRunConfig({ MaxDegreeOfParallelism = 1 } ),\n fun (x:int) -\u003E \n async { \n do! Async.Sleep (abs x)\n return true\n }\n)"},{"uri":"https://fscheck.github.io/FsCheck/users.html","title":"Who is using FsCheck?\r\n","content":"# Who is using FsCheck?\r\n\r\nPlease send a pull request if you want to be added.\r\n\r\n* [Fantomas](https://github.com/dungpa/fantomas)\r\n* [fsharpx](https://github.com/fsharp/fsharpx)\r\n* [FsPickler](https://github.com/nessos/FsPickler)\r\n* [LinqOptimizer](https://github.com/nessos/LinqOptimizer)\r\n* [Credit Suisse](http://www.credit-suisse.com)\r\n* [BlueMountain Capital](https://github.com/bluemountaincapital)\r\n* [Tachyus](http://tachyus.com/)\r\n* [Fred](https://github.com/frankshearar/Fred/)\r\n* [Digital Furnace Games](http://www.digitalfurnacegames.com/)\r\n* [15below](http://15below.com/)\r\n* [AntaniXml](http://giacomociti.github.io/AntaniXml/)\r\n* [DoctestInteractive](https://github.com/tomakita/DoctestInteractive/)\r\n* [Darklang](https://github.com/darklang/dark/)\r\n\r\n## Academia\r\n\r\nYes, to my surprise people are writing academic papers about FsCheck. Well, at least one!\r\n\r\n* Bernhard K. Aichernig and Richard Schumi. Property-based Testing with FsCheck by Deriving \r\nProperties from Business Rule Models. In 2016 IEEE Ninth International Conference on Software\r\nTesting, Verification, and Validation Workshops (ICSTW), 13th Workshop on Advances in Model \r\nBased Testing (A-MOST 2016), IEEE, 2016. In press. [Link](http://truconf.ist.tugraz.at/index.php/2016/03/04/publication-at-a-most-2016/)\r\n"}]
\ No newline at end of file
diff --git a/reference/fscheck-fluent-arb.html b/reference/fscheck-fluent-arb.html
index bf834396..7b958543 100644
--- a/reference/fscheck-fluent-arb.html
+++ b/reference/fscheck-fluent-arb.html
@@ -169,7 +169,7 @@
|
-
+
@@ -257,7 +257,7 @@
|
-
+
@@ -352,7 +352,7 @@
|
-
+
@@ -439,7 +439,7 @@
|
-
+
@@ -517,7 +517,7 @@
|
-
+
@@ -604,7 +604,7 @@
|
-
+
@@ -694,7 +694,7 @@
|
-
+
@@ -772,7 +772,7 @@
|
-
+
@@ -850,7 +850,7 @@
|
-
+
@@ -929,7 +929,7 @@
|
-
+
diff --git a/reference/fscheck-fluent-gen.html b/reference/fscheck-fluent-gen.html
index b865cb29..4bc263cb 100644
--- a/reference/fscheck-fluent-gen.html
+++ b/reference/fscheck-fluent-gen.html
@@ -1114,14 +1114,14 @@
create
:
- Func<Gen<'T>>
+ Func<'T>
Returns:
- Gen<Gen<'T>>
+ Gen<'T>
@@ -1147,7 +1147,7 @@
create
:
- Func<Gen<'T>>
+ Func<'T>
@@ -1156,7 +1156,7 @@
Returns:
- Gen<Gen<'T>>
+ Gen<'T>
diff --git a/reference/fscheck-fluent.html b/reference/fscheck-fluent.html
index c571c83d..2536faeb 100644
--- a/reference/fscheck-fluent.html
+++ b/reference/fscheck-fluent.html
@@ -112,7 +112,7 @@
|
-
+
|
|
|
|
|
|
|
|
|
|
|
|