()
| 356 | |
| 357 | #[test] |
| 358 | fn test_entity_kind_roundtrip() { |
| 359 | let kinds = [ |
| 360 | EntityKind::Function, |
| 361 | EntityKind::Method, |
| 362 | EntityKind::Class, |
| 363 | EntityKind::Interface, |
| 364 | EntityKind::TypeAlias, |
| 365 | EntityKind::Const, |
| 366 | EntityKind::Enum, |
| 367 | ]; |
| 368 | |
| 369 | for kind in kinds { |
| 370 | let s = kind.as_str(); |
| 371 | let parsed = s.parse::<EntityKind>(); |
| 372 | assert_eq!(parsed, Ok(kind)); |
| 373 | } |
| 374 | } |
| 375 | |
| 376 | #[test] |
| 377 | fn test_entity_builder() { |