Skip to content

Instantly share code, notes, and snippets.

@z0w0
Created September 3, 2012 10:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save z0w0/3608372 to your computer and use it in GitHub Desktop.
Save z0w0/3608372 to your computer and use it in GitHub Desktop.
Quickcheck in Rust
// each argument is randomized (error if the argument is not a primitive type or string)
#[quickcheck(tries = 1000)]
fn even(number: int) {
return number % 2 == 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment