()
| 153 | |
| 154 | #[test] |
| 155 | fn test_kindset_add_remove() { |
| 156 | let k_ident = KindSet::new(&[Kind::Ident]); |
| 157 | let k_ident_eof = k_ident.add(Kind::Eof); |
| 158 | assert!(k_ident.contains(Kind::Ident)); |
| 159 | assert!(k_ident_eof.contains(Kind::Ident)); |
| 160 | assert!(k_ident_eof.contains(Kind::Eof)); |
| 161 | assert!(!k_ident_eof.remove(Kind::Eof).contains(Kind::Eof)); |
| 162 | } |