Created
February 24, 2015 08:12
-
-
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
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
| 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