CsCheck/Check.cs
/// <summary>Sample model-based operations on a random initial state concurrently.
/// The result is compared against the result of the possible sequential permutations.
/// At least one of these permutations result must be equal for the concurrency to have been linearized successfully.
/// If not the failing initial state and sequence will be shrunk down to the shortest and simplest.</summary>
/// <param name="initial">The initial state generator.</param>
/// <param name="operation1">An operation generator that can act on the state concurrently.</param>
/// <param name="operation2">An operation generator that can act on the state concurrently.</param>
/// <param name="operation3">An operation generator that can act on the state concurrently.</param>
/// <param name="operation4">An operation generator that can act on the state concurrently.</param>
/// <param name="operation5">An operation generator that can act on the state concurrently.</param>
/// <param name="equal">A function to check if the two states are the same (default Check.Equal).</param>
/// <param name="seed">The initial seed to use for the first iteration.</param>
/// <param name="iter">The number of iterations to run in the sample (default 100).</param>
/// <param name="time">The number of seconds to run the sample.</param>
/// <param name="threads">The number of threads to run the sample on (default number logical CPUs).</param>
/// <param name="print">A function to convert the state to a string for error reporting (default Check.Print).</param>
/// <param name="replay">The number of times to retry the seed to reproduce an initial fail (default 100).</param>
Sample model-based operations on a random initial state concurrently.
The result is compared against the result of the possible sequential permutations.
At least one of these permutations result must be equal for the concurrency to have been linearized successfully.
If not the failing initial state and sequence will be shrunk down to the shortest and simplest.
Sample model - based operations on a random initial state concurrently . The result is compared against the result of the possible sequential permutations . At least one of these permutations result must be equal for the concurrency to have been linearized successfully . If not the failing initial state and sequence will be shrunk down to the shortest and simplest .
public static void SampleConcurrent<T>(this Gen<T> initial, GenOperation<T> operation1, GenOperation<T> operation2,
            GenOperation<T> operation3, GenOperation<T> operation4, GenOperation<T> operation5,
            Func<T, T, bool> equal = null, string seed = null, long iter = -1, int time = -1, int threads = -1, Func<T, string> print = null, int replay = -1)
            => SampleConcurrent(initial, new[] { operation1, operation2, operation3, operation4, operation5 },
                equal, seed, iter, time, threads, print, replay);
public static void SampleConcurrent < T > ( this Gen < T > initial , GenOperation < T > operation1 , GenOperation < T > operation2 , GenOperation < T > operation3 , GenOperation < T > operation4 , GenOperation < T > operation5 , Func < T , T , bool > equal = null , string seed = null , long iter = - 1 , int time = - 1 , int threads = - 1 , Func < T , string > print = null , int replay = - 1 ) => SampleConcurrent ( initial , new [ ] { operation1 , operation2 , operation3 , operation4 , operation5 } , equal , seed , iter , time , threads , print , replay ) ;
Sample model-based operations on a random initial state concurrently.
Sample model - based operations on a random initial state concurrently .
Gen<T>
this
<not_specific>
operation1
GenOperation<T>
An operation generator that can act on the state concurrently.
An operation generator that can act on the state concurrently .
operation2
GenOperation<T>
An operation generator that can act on the state concurrently.
An operation generator that can act on the state concurrently .
operation3
GenOperation<T>
An operation generator that can act on the state concurrently.
An operation generator that can act on the state concurrently .
operation4
GenOperation<T>
An operation generator that can act on the state concurrently.
An operation generator that can act on the state concurrently .
operation5
GenOperation<T>
An operation generator that can act on the state concurrently.
An operation generator that can act on the state concurrently .
equal
Func<T, T, bool>
A function to check if the two states are the same (default Check.Equal).
A function to check if the two states are the same ( default Check . Equal ) .
seed
string
The initial seed to use for the first iteration.
The initial seed to use for the first iteration .
iter
long
The number of iterations to run in the sample (default 100).
The number of iterations to run in the sample ( default 100 ) .
time
int
The number of seconds to run the sample.
The number of seconds to run the sample .
threads
int
The number of threads to run the sample on (default number logical CPUs).
The number of threads to run the sample on ( default number logical CPUs ) .
print
Func<T, string>
A function to convert the state to a string for error reporting (default Check.Print).
A function to convert the state to a string for error reporting ( default Check . Print ) .
replay
int
The number of times to retry the seed to reproduce an initial fail (default 100).
The number of times to retry the seed to reproduce an initial fail ( default 100 ) .
initial
<not_specific>
The initial state generator.
The initial state generator .