(e: &Expr)
| 306 | } |
| 307 | |
| 308 | fn expr_roundtrip(e: &Expr) -> bool { |
| 309 | let mut buf = Vec::new(); |
| 310 | put_expr(e, &mut buf); |
| 311 | match get_expr(&mut buf.as_slice()) { |
| 312 | Ok(e2) => e == e2.as_ref(), |
| 313 | Err(err) => { |
| 314 | eprintln!("expr_roundtrip error: {err}"); |
| 315 | false |
| 316 | }, |
| 317 | } |
| 318 | } |
| 319 | |
| 320 | #[quickcheck] |
| 321 | fn prop_expr_roundtrip(e: ArbitraryExpr) -> bool { |
no test coverage detected