[−][src]Function solana_libra_proptest_helpers::with_stack_size
pub fn with_stack_size<'a, F, T>(
size: usize,
f: F
) -> Result<T, Box<dyn Any + Send + 'static>> where
F: FnOnce() -> T + Send + 'a,
T: Send + 'a,
Creates a new thread with a larger stack size.
Generating some proptest values can overflow the stack. This allows test authors to work around this limitation.
This is expected to be used with closure-style proptest invocations:
use proptest::prelude::*; use proptest_helpers::with_stack_size; with_stack_size(4 * 1024 * 1024, || proptest!(|(x in 0usize..128)| { // assertions go here prop_assert!(x >= 0 && x < 128); }));