Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

disprove

Property-based testing for Rust — a modern, maintained replacement for quickcheck.

Features

  • API-compatible with quickcheck for easy migration
  • Const generics support for arrays of any size
  • Deterministic seeds via QUICKCHECK_SEED for reproducible failures
  • More Arbitrary impls for newer std types
  • #[quickcheck] proc macro for ergonomic test definitions
  • Rust 1.75+ MSRV

Usage

use disprove::{quickcheck, Arbitrary, Gen};

fn prop_sort_is_idempotent(mut xs: Vec<i32>) -> bool {
    xs.sort();
    let sorted = xs.clone();
    xs.sort();
    xs == sorted
}

#[test]
fn test_sort() {
    quickcheck(prop_sort_is_idempotent as fn(Vec<i32>) -> bool);
}

License

Licensed under either of Apache License, Version 2.0 or MIT License at your option.

About

Property-based testing for Rust — a modern replacement for quickcheck

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages