blob: 8f04b0dc24724115e1a32f0777d625b9870b50c7 [file] [log] [blame]
Michael Bradshaw7531e152018-10-19 22:26:56 -07001// Copyright 2018 Syn Developers
2//
3// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
6// option. This file may not be copied, modified, or distributed
7// except according to those terms.
8
9#[macro_use]
10extern crate quote;
11extern crate syn;
12
David Tolnayc3f98562018-11-02 08:55:05 -070013mod features;
14
Michael Bradshaw7531e152018-10-19 22:26:56 -070015#[test]
16fn test_pat_ident() {
David Tolnay845c8662018-10-20 08:12:25 -040017 match syn::parse2(quote!(self)).unwrap() {
18 syn::Pat::Ident(_) => (),
19 value => panic!("expected PatIdent, got {:?}", value),
20 }
Michael Bradshaw7531e152018-10-19 22:26:56 -070021}
22
23#[test]
24fn test_pat_path() {
David Tolnay845c8662018-10-20 08:12:25 -040025 match syn::parse2(quote!(self::CONST)).unwrap() {
26 syn::Pat::Path(_) => (),
27 value => panic!("expected PatPath, got {:?}", value),
28 }
29}