pub use crate::arbitrary::{empty_shrinker, single_shrinker, Arbitrary, Gen};
pub use crate::tester::{quickcheck, QuickCheck, TestResult, Testable};
#[macro_export]
macro_rules! quickcheck {
(@as_items $($i:item)*) => ($($i)*);
{
$(
$(#[$m:meta])*
fn $fn_name:ident($($arg_name:ident : $arg_ty:ty),*) -> $ret:ty {
$($code:tt)*
}
)*
} => (
$crate::quickcheck! {
@as_items
$(
#[test]
$(#[$m])*
fn $fn_name() {
fn prop($($arg_name: $arg_ty),*) -> $ret {
$($code)*
}
$crate::quickcheck(prop as fn($($arg_ty),*) -> $ret);
}
)*
}
)
}
#[cfg(feature = "use_logging")]
fn env_logger_init() -> Result<(), log::SetLoggerError> {
env_logger::try_init()
}
#[cfg(feature = "use_logging")]
macro_rules! info {
($($tt:tt)*) => {
log::info!($($tt)*)
};
}
#[cfg(not(feature = "use_logging"))]
fn env_logger_init() {}
#[cfg(not(feature = "use_logging"))]
macro_rules! info {
($($_ignore:tt)*) => {
()
};
}
mod arbitrary;
mod tester;
#[cfg(test)]
mod tests;