]>
Commit | Line | Data |
---|---|---|
e74abb32 XL |
1 | mod features; |
2 | ||
3 | use quote::quote; | |
4 | use syn::Pat; | |
5 | ||
6 | #[test] | |
7 | fn test_pat_ident() { | |
8 | match syn::parse2(quote!(self)).unwrap() { | |
9 | Pat::Ident(_) => (), | |
10 | value => panic!("expected PatIdent, got {:?}", value), | |
11 | } | |
12 | } | |
13 | ||
14 | #[test] | |
15 | fn test_pat_path() { | |
16 | match syn::parse2(quote!(self::CONST)).unwrap() { | |
17 | Pat::Path(_) => (), | |
18 | value => panic!("expected PatPath, got {:?}", value), | |
19 | } | |
20 | } |