blob: c5423d98781ac51934b3b00ad19405da30088102 [file] [log] [blame]
Michael Bradshaw7531e152018-10-19 22:26:56 -07001#[macro_use]
2extern crate quote;
3extern crate syn;
4
David Tolnayc3f98562018-11-02 08:55:05 -07005mod features;
6
Michael Bradshaw7531e152018-10-19 22:26:56 -07007#[test]
8fn test_pat_ident() {
David Tolnay845c8662018-10-20 08:12:25 -04009 match syn::parse2(quote!(self)).unwrap() {
10 syn::Pat::Ident(_) => (),
11 value => panic!("expected PatIdent, got {:?}", value),
12 }
Michael Bradshaw7531e152018-10-19 22:26:56 -070013}
14
15#[test]
16fn test_pat_path() {
David Tolnay845c8662018-10-20 08:12:25 -040017 match syn::parse2(quote!(self::CONST)).unwrap() {
18 syn::Pat::Path(_) => (),
19 value => panic!("expected PatPath, got {:?}", value),
20 }
21}