Expand description
tatara-rust-proptest — property-based testing primitives.
Three layers of generators + canned property assertions:
- L0 generators —
arb_ident,arb_type_ref,arb_ref_kind. - L2 generators —
arb_per_field_spec,arb_per_variant_spec,arb_proc_derive_spec. - Property assertions —
prop_validate_is_total,prop_emit_does_not_panic,prop_serde_roundtrips. Each is a closure suitable forproptest!.
Consumers add a single #[test] per Spec that calls one of the
prop_* assertions; proptest runs 256 randomized cases.
Functions§
- arb_
ident - Random valid Rust identifier: starts with
[A-Za-z_], body is[A-Za-z0-9_]{0,15}. Excludes the empty string. - arb_
per_ field_ spec - Random PerFieldDeriveSpec — template + trait_name come from arb_ident; optional method_name_template + impl_prelude.
- arb_
per_ variant_ spec - arb_
proc_ derive_ spec - arb_
ref_ kind - arb_
type_ ref - Recursive TypeRef generator bounded to depth 3.
- prop_
to_ tokens_ does_ not_ panic - Identifier rendering doesn’t panic. Catches bad escape-handling
in
ToRustTokensimpls. - prop_
validate_ is_ total - Totality —
validatereturns a Vec regardless of the input. Calling it twice produces the same Vec. Use to assert the validator is deterministic + total over the Spec space.