MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_entity_kind_roundtrip

Function test_entity_kind_roundtrip

atomic-semantic/src/entity.rs:347–363  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 1

as_strMethod · 0.45

Tested by

no test coverage detected