Created
May 29, 2016 13:01
-
-
Save rexcfnghk/a6f5437d5bb3dbdce88bb1a2a590f6b1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [<Property>] | |
| let ``tryConvertToChar returns error for strings with length > 2 `` () = | |
| let stringLengthLargerThan2Arb = | |
| Arb.generate<string> | |
| |> Gen.suchThat (fun s -> String.length s >= 2) | |
| |> Arb.fromGen | |
| Prop.forAll stringLengthLargerThan2Arb <| fun s -> | |
| test <@ match tryConvertToChar s with Success _ -> false | Error _ -> true @> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment