fn tag_minimal(
) -> impl Strategy<Value = Test<Tag>, Tree = impl ValueTree<Value = Test<Tag>>>
{
    (
        prop::bool::ANY, prop::option::of(namespace()), ident(), "[ \t]+",
        prop::collection::vec((value(), "[ \t]+"), 0..32),
        prop::collection::vec((attribute(), "[ \t]+"), 0..32),
    )
    .prop_map(|(use_name, namespace, name, white, values, attributes)| {
        let name = if values.len() == 0 || use_name {
            let namespace = namespace
                .map_or(Test::new(String::new(), None), |namespace| {
                    namespace.map_res(Some)
                });
            Test::new(
                format!("{}{}{}", namespace.text, name.text, white),
                Tag::new(name.result).namespace_opt(namespace.result),
            )
        } else {
            Test::new(String::new(), Tag::new(String::new()))
        };
        Test::new(
            format!(
                "{}{}{}",
                name.text,
                values.iter().format_with("", |(v, w), f| f(
                    &format_args!("{}{}", v.text, w,)
                )),
                attributes.iter().format_with("", |(a, w), f| f(
                    &format_args!("{}{}", a.text, w,)
                ))
            ),
            name.result
                .values(values.into_iter().map(|e| e.0.result))
                .attrs(attributes.into_iter().map(|e| e.0.result)),
        )
    })
}
/// Creates a minimal, non-recursive tag.
Creates a minimal, non-recursive tag.
Creates a minimal non - recursive tag .
fn tag_minimal(
) -> impl Strategy<Value = Test<Tag>, Tree = impl ValueTree<Value = Test<Tag>>>
{
    (
        prop::bool::ANY, prop::option::of(namespace()), ident(), "[ \t]+",
        prop::collection::vec((value(), "[ \t]+"), 0..32),
        prop::collection::vec((attribute(), "[ \t]+"), 0..32),
    )
    .prop_map(|(use_name, namespace, name, white, values, attributes)| {
        let name = if values.len() == 0 || use_name {
            let namespace = namespace
                .map_or(Test::new(String::new(), None), |namespace| {
                    namespace.map_res(Some)
                });
            Test::new(
                format!("{}{}{}", namespace.text, name.text, white),
                Tag::new(name.result).namespace_opt(namespace.result),
            )
        } else {
            Test::new(String::new(), Tag::new(String::new()))
        };
        Test::new(
            format!(
                "{}{}{}",
                name.text,
                values.iter().format_with("", |(v, w), f| f(
                    &format_args!("{}{}", v.text, w,)
                )),
                attributes.iter().format_with("", |(a, w), f| f(
                    &format_args!("{}{}", a.text, w,)
                ))
            ),
            name.result
                .values(values.into_iter().map(|e| e.0.result))
                .attrs(attributes.into_iter().map(|e| e.0.result)),
        )
    })
}
fn tag_minimal ( ) -> impl Strategy < Value = Test < Tag > , Tree = impl ValueTree < Value = Test < Tag > > > { ( prop :: bool :: ANY , prop :: option :: of ( namespace ( ) ) , ident ( ) , " \t " , prop :: collection :: vec ( ( value ( ) , " \t " ) , 0 .. 32 ) , prop :: collection :: vec ( ( attribute ( ) , " \t " ) , 0 .. 32 ) , ) . prop_map ( | ( use_name , namespace , name , white , values , attributes ) | { let name = if values . len ( ) == 0 || use_name { let namespace = namespace . map_or ( Test :: new ( String :: new ( ) , None ) , | namespace | { namespace . map_res ( Some ) } ) ; Test :: new ( format ! ( " " namespace text name text white ) , Tag :: new ( name . result ) . namespace_opt ( namespace . result ) , ) } else { Test :: new ( String :: new ( ) , Tag :: new ( String :: new ( ) ) ) } ; Test :: new ( format ! ( " " name text values iter ( ) format_with ( " " ( v w ) f f ( format_args ( " " v text w ) ) ) attributes iter ( ) format_with ( " " ( a w ) f f ( format_args ( " " a text w ) ) ) ) , name . result . values ( values . into_iter ( ) . map ( | e | e . 0 . result ) ) . attrs ( attributes . into_iter ( ) . map ( | e | e . 0 . result ) ) , ) } ) }
Creates a minimal, non-recursive tag.
Creates a minimal non - recursive tag .