perl-test-generators 0.17.0

Proptest strategies and Arbitrary impls for Perl domain objects
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use proptest::prelude::*;

pub(super) fn ascii_letter_or_underscore() -> impl Strategy<Value = char> {
    prop_oneof![prop::char::range('a', 'z'), prop::char::range('A', 'Z'), Just('_')]
}

pub(super) fn ascii_alphanumeric_or_underscore() -> impl Strategy<Value = char> {
    prop_oneof![
        prop::char::range('a', 'z'),
        prop::char::range('A', 'Z'),
        prop::char::range('0', '9'),
        Just('_'),
    ]
}