1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Core types for the native test engine.
//
// Split into submodules:
// choices — choice types (ChoiceKind, ChoiceNode, ChoiceValue, etc.)
// float_index — float lex ordering (float_to_index, index_to_float)
// state — NativeTestCase, ManyState, NativeVariables, Span
// state_machine — NativeStateMachine (swarm rule selection)
pub
pub
pub
pub
pub use ;
pub use ;
pub use ;
pub use NativeStateMachine;
/// Maximum number of choices a single test case can make.
pub const BUFFER_SIZE: usize = 8 * 1024;
/// Probability of drawing a boundary/special value per special candidate.
pub const BOUNDARY_PROBABILITY: f64 = 0.01;
/// Hard cap on the number of successful shrink improvements per
/// counterexample. Once the shrinker has accepted this many
/// strictly-smaller candidates, further `consider` / `probe` calls
/// short-circuit so the runner doesn't get stuck chasing diminishing
/// returns on pathological inputs.
pub const MAX_SHRINKS: usize = 500;
/// Wall-clock ceiling on the whole shrinking phase. Once shrinking has run
/// for this long it stops and reports the smallest counterexample found so
/// far, rather than blocking the run indefinitely on a test whose body is
/// slow to execute (where the per-step `MAX_SHRINKS` / stall caps don't bound
/// total time). Mirrors Hypothesis's `MAX_SHRINKING_SECONDS` safety valve.
pub const MAX_SHRINKING_SECONDS: u64 = 300;