Skip to content

Instantly share code, notes, and snippets.

@zkessin
Created December 21, 2015 17:31
Show Gist options
  • Save zkessin/826fa57e51e124162c63 to your computer and use it in GitHub Desktop.
Save zkessin/826fa57e51e124162c63 to your computer and use it in GitHub Desktop.
module ExampleCheck where
import Graphics.Element exposing (Element, show)
import Check.Investigator exposing (..)
import Check exposing (..)
claim_reverse_twice_yields_original =
claim
"Reversing a list twice yields the original list"
`that`
(\list -> List.reverse (List.reverse list))
`is`
(identity)
`for`
list int
claim_reverse_does_not_modify_length =
claim
"Reversing a list does not modify its length"
`that`
(\list -> List.length (List.reverse list))
`is`
(\list -> List.length list)
`for`
list int
suite_reverse =
suite "List Reverse Suite"
[ claim_reverse_twice_yields_original
, claim_reverse_does_not_modify_length
]
result = quickCheck suite_reverse
main = display result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment