David Tolnay | fa0edf2 | 2016-09-23 22:58:24 -0700 | [diff] [blame] | 1 | #![cfg(feature = "full")] |
2 | |||||
3 | extern crate syn; | ||||
4 | use syn::*; | ||||
5 | |||||
6 | #[test] | ||||
7 | fn test_box() { | ||||
8 | let raw = "box 0"; | ||||
9 | |||||
10 | let expected = Expr::Box(Box::new( | ||||
11 | Expr::Lit(Lit::Int(0, IntTy::Unsuffixed)) | ||||
12 | )); | ||||
13 | |||||
14 | assert_eq!(expected, parse_expr(raw).unwrap()); | ||||
15 | } |