()
| 345 | |
| 346 | #[test] |
| 347 | fn test_entity_kind_roundtrip() { |
| 348 | let kinds = [ |
| 349 | EntityKind::Function, |
| 350 | EntityKind::Method, |
| 351 | EntityKind::Class, |
| 352 | EntityKind::Interface, |
| 353 | EntityKind::TypeAlias, |
| 354 | EntityKind::Const, |
| 355 | EntityKind::Enum, |
| 356 | ]; |
| 357 | |
| 358 | for kind in kinds { |
| 359 | let s = kind.as_str(); |
| 360 | let parsed = s.parse::<EntityKind>(); |
| 361 | assert_eq!(parsed, Ok(kind)); |
| 362 | } |
| 363 | } |
| 364 | |
| 365 | #[test] |
| 366 | fn test_entity_builder() { |