Michael Bradshaw | 7531e15 | 2018-10-19 22:26:56 -0700 | [diff] [blame] | 1 | // 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] |
| 10 | extern crate quote; |
| 11 | extern crate syn; |
| 12 | |
David Tolnay | c3f9856 | 2018-11-02 08:55:05 -0700 | [diff] [blame^] | 13 | mod features; |
| 14 | |
Michael Bradshaw | 7531e15 | 2018-10-19 22:26:56 -0700 | [diff] [blame] | 15 | #[test] |
| 16 | fn test_pat_ident() { |
David Tolnay | 845c866 | 2018-10-20 08:12:25 -0400 | [diff] [blame] | 17 | match syn::parse2(quote!(self)).unwrap() { |
| 18 | syn::Pat::Ident(_) => (), |
| 19 | value => panic!("expected PatIdent, got {:?}", value), |
| 20 | } |
Michael Bradshaw | 7531e15 | 2018-10-19 22:26:56 -0700 | [diff] [blame] | 21 | } |
| 22 | |
| 23 | #[test] |
| 24 | fn test_pat_path() { |
David Tolnay | 845c866 | 2018-10-20 08:12:25 -0400 | [diff] [blame] | 25 | match syn::parse2(quote!(self::CONST)).unwrap() { |
| 26 | syn::Pat::Path(_) => (), |
| 27 | value => panic!("expected PatPath, got {:?}", value), |
| 28 | } |
| 29 | } |