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

Function test_entity_kind_roundtrip

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

as_strMethod · 0.45

Tested by

no test coverage detected