Module strategies
proptest only.Expand description
proptest strategies over the contract’s value types.
These live here, in a public module of the testkit, rather than in a test
binary, because the testkit’s own claim about them is that an adapter pushing
query matching down into SQL is asserting the same laws about its WHERE
clause and should be able to reuse the generators. Generators private to an
integration test are reachable by nobody, which made that claim false.
Behind the off-by-default proptest feature: proptest does not build for
wasm32-unknown-unknown, and the mandatory wasm32 step of cargo xtask ci
must stay buildable. --all-features turns it on.
Write your proptest! blocks against the [proptest] re-export above rather
than a second dependency entry of your own; see its documentation for what
goes wrong otherwise.
Functions§
- any_
event - Generates an
Event: a type, a tag set, a small payload, and metadata half the time. - any_
event_ type - Generates an
EventTypefrom a three-symbol alphabet, for the same reasonany_tag’s is five. - any_
query - Generates a
Query, weighted towardsItems—Allhas one behaviour and needs one sample, not a third of them. - any_
query_ item - Generates a
QueryItemover the alphabets above. - any_tag
- Generates a tag from a five-symbol alphabet.
- any_
tags - Generates a canonical
Tagsof up to six tags fromany_tag.