Michael Bradshaw | 7531e15 | 2018-10-19 22:26:56 -0700 | [diff] [blame] | 1 | #[macro_use] |
| 2 | extern crate quote; |
| 3 | extern crate syn; |
| 4 | |
David Tolnay | c3f9856 | 2018-11-02 08:55:05 -0700 | [diff] [blame] | 5 | mod features; |
| 6 | |
Michael Bradshaw | 7531e15 | 2018-10-19 22:26:56 -0700 | [diff] [blame] | 7 | #[test] |
| 8 | fn test_pat_ident() { |
David Tolnay | 845c866 | 2018-10-20 08:12:25 -0400 | [diff] [blame] | 9 | match syn::parse2(quote!(self)).unwrap() { |
| 10 | syn::Pat::Ident(_) => (), |
| 11 | value => panic!("expected PatIdent, got {:?}", value), |
| 12 | } |
Michael Bradshaw | 7531e15 | 2018-10-19 22:26:56 -0700 | [diff] [blame] | 13 | } |
| 14 | |
| 15 | #[test] |
| 16 | fn test_pat_path() { |
David Tolnay | 845c866 | 2018-10-20 08:12:25 -0400 | [diff] [blame] | 17 | match syn::parse2(quote!(self::CONST)).unwrap() { |
| 18 | syn::Pat::Path(_) => (), |
| 19 | value => panic!("expected PatPath, got {:?}", value), |
| 20 | } |
| 21 | } |