diff options
Diffstat (limited to 'rust/src/parser.rs')
| -rw-r--r-- | rust/src/parser.rs | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/rust/src/parser.rs b/rust/src/parser.rs index 2a5fef4..52aad5a 100644 --- a/rust/src/parser.rs +++ b/rust/src/parser.rs @@ -382,35 +382,6 @@ mod tests { ); } - impl Arbitrary for Value { - type Parameters = (); - type Strategy = BoxedStrategy<Self>; - - fn arbitrary_with(_args: ()) -> Self::Strategy { - let identifier = "\\pL(\\pL|\\pN)*"; - let leaf = prop_oneof![ - any::<i32>().prop_map(Num), - any::<bool>().prop_map(Bool), - // see https://unicode.org/reports/tr18/#General_Category_Property for one letter unicode categories - identifier.prop_map(Sym), - ]; - let expr = leaf.prop_recursive(4, 128, 5, move |inner| { - prop_oneof![ - (inner.clone(), inner.clone()).prop_map(|(l, r)| App(Box::new(l), Box::new(r))), - (identifier, inner.clone()).prop_map(|(var, body)| Lam(var, Box::new(body))), - (identifier, inner.clone(), inner.clone()).prop_map(|(var, body, expr)| { - Value::Let(var, Box::new(body), Box::new(expr)) - }), - ] - }); - prop_oneof![ - expr.clone(), - (identifier, expr).prop_map(|(var, body)| Def(var, Box::new(body))) - ] - .boxed() - } - } - proptest! { #[test] fn parse_is_inverse_to_display(values in any::<Vec<Value>>()) { |
