Skip to content

Instantly share code, notes, and snippets.

@rexcfnghk
Created May 29, 2016 12:55
Show Gist options
  • Select an option

  • Save rexcfnghk/6ea4ea45b5c709db720666e785a9fae2 to your computer and use it in GitHub Desktop.

Select an option

Save rexcfnghk/6ea4ea45b5c709db720666e785a9fae2 to your computer and use it in GitHub Desktop.
[<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