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