Skip to content

Instantly share code, notes, and snippets.

@moodmosaic
Created February 24, 2015 08:12
Show Gist options
  • Select an option

  • Save moodmosaic/8c115c4682b7f5e71be6 to your computer and use it in GitHub Desktop.

Select an option

Save moodmosaic/8c115c4682b7f5e71be6 to your computer and use it in GitHub Desktop.
Exude applied to post titled: Property Based Testing without a Property Based Testing framework
let verify = Swensen.Unquote.Assertions.test
[<FirstClassTests>]
let ``Diamond is as wide as it's high`` () =
seq {'A' .. 'Z'}
|> Seq.map (fun letter -> TestCase (fun () ->
let actual = Diamond.make letter
let rows = split actual
let expected = rows.Length
rows |> Array.iter (fun x -> verify <@ x.Length = expected @>)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment