]> git.proxmox.com Git - rustc.git/blame - vendor/syn/tests/test_pat.rs
New upstream version 1.40.0+dfsg1
[rustc.git] / vendor / syn / tests / test_pat.rs
CommitLineData
e74abb32
XL
1extern crate quote;
2extern crate syn;
3
4mod features;
5
6use quote::quote;
7use syn::Pat;
8
9#[test]
10fn 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]
18fn test_pat_path() {
19 match syn::parse2(quote!(self::CONST)).unwrap() {
20 Pat::Path(_) => (),
21 value => panic!("expected PatPath, got {:?}", value),
22 }
23}