Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Created December 31, 2016 16:33
Show Gist options
  • Save deque-blog/132d9acc2f8b240043e56df4791a825d to your computer and use it in GitHub Desktop.
Save deque-blog/132d9acc2f8b240043e56df4791a825d to your computer and use it in GitHub Desktop.
tests :: Test
tests =
let multiples_of_3_and_5 = [3 * 5, 2 * 3 * 5, 3 * 3 * 5]
multiples_of_3 = [3, 1 * 3, 2 * 3, 3 * 3]
multiples_of_5 = [5, 1 * 5, 2 * 5, 3 * 5]
other_numbers = [0, 1, 2, 4]
in TestList
[ fizzBuzz `should_equal` "FizzBuzz" `for_all` multiples_of_3_and_5
, fizzBuzz `should_equal` "Fizz" `for_all` multiples_of_3
, fizzBuzz `should_equal` "Buzz" `for_all` multiples_of_5
, fizzBuzz `should_do_like` show `for_all` other_numbers
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment