Created
May 29, 2016 12:55
-
-
Save rexcfnghk/6ea4ea45b5c709db720666e785a9fae2 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 the same char from the one-character string`` () = | |
| let validStringArb = | |
| Arb.generate<char> | |
| |> Gen.map string | |
| |> Arb.fromGen | |
| Prop.forAll validStringArb <| fun s -> | |
| let cV = tryConvertToChar s | |
| test <@ match cV with Success c -> sprintf "%c" c = s | Error _ -> false @> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment