Skip to content

Commit 409240b

Browse files
committed
chore: add with-pox to proptests
1 parent 46c71b3 commit 409240b

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

clarity/src/vm/tests/proptest_utils.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,17 +629,27 @@ pub fn stacking_allowance_snippets() -> impl Strategy<Value = String> {
629629
any::<u128>().prop_map(|amount| format!("(with-staking u{amount})"))
630630
}
631631

632+
/// A strategy that generates Clarity code snippets for PoX-action allowances.
633+
/// `with-pox` takes no amount; its presence simply permits position-altering
634+
/// PoX actions (`unstake`, `unstake-sbtc`, `update-bond-registration`,
635+
/// `announce-l1-early-exit`).
636+
pub fn pox_allowance_snippets() -> impl Strategy<Value = String> {
637+
Just("(with-pox)".to_string())
638+
}
639+
632640
/// A strategy that generates Clarity code snippets for allowances.
633641
pub fn allowance_snippets() -> impl Strategy<Value = String> {
634642
let stx_allowance = stx_allowance_snippets();
635643
let ft_allowance = ft_allowance_snippets();
636644
let nft_allowance = nft_allowance_snippets();
637645
let stacking_allowance = stacking_allowance_snippets();
646+
let pox_allowance = pox_allowance_snippets();
638647
prop_oneof![
639648
stx_allowance,
640649
ft_allowance,
641650
nft_allowance,
642-
stacking_allowance
651+
stacking_allowance,
652+
pox_allowance
643653
]
644654
}
645655

0 commit comments

Comments
 (0)