Getting Started
An overview of Persimmon.Dried, how to download and use.
Getting Persimmon.Dried
Run the command below:
1:
|
|
The first step
open an fsx file and start with:
1: 2: 3: 4: 5: 6: |
|
You can write the properties by using Prop.forAll
, Arbitrary
instances and function:
1: 2: 3: |
|
Checking property
We load this definition in F# interactive and then invoke.
1:
|
|
1:
|
|
|
When a property fails, Persimmon.Dried displays a counterexample. For example, You define
1: 2: 3: |
|
and check property
1:
|
|
|
Checking properties by using Persimmon.Console
Now create a project and write the test by using property
computation expression.
1: 2: 3: 4: 5: |
|
Run the command below:
1: 2: |
|
val ( reverse and reverse is original ) : obj
Full name: GettingStarted.( reverse and reverse is original )
Full name: GettingStarted.( reverse and reverse is original )
type 'T list = List<'T>
Full name: Microsoft.FSharp.Collections.list<_>
Full name: Microsoft.FSharp.Collections.list<_>
Multiple items
val int : value:'T -> int (requires member op_Explicit)
Full name: Microsoft.FSharp.Core.Operators.int
--------------------
type int = int32
Full name: Microsoft.FSharp.Core.int
--------------------
type int<'Measure> = int
Full name: Microsoft.FSharp.Core.int<_>
val int : value:'T -> int (requires member op_Explicit)
Full name: Microsoft.FSharp.Core.Operators.int
--------------------
type int = int32
Full name: Microsoft.FSharp.Core.int
--------------------
type int<'Measure> = int
Full name: Microsoft.FSharp.Core.int<_>
Multiple items
module List
from Microsoft.FSharp.Collections
--------------------
module List
from Microsoft.FSharp.Collections
--------------------
val prms : obj
Full name: GettingStarted.prms
Full name: GettingStarted.prms
val ( failure example ) : obj
Full name: GettingStarted.( failure example )
Full name: GettingStarted.( failure example )
val ( binding example ) : obj
Full name: GettingStarted.( binding example )
Full name: GettingStarted.( binding example )