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

Function test_extract_enum

atomic-semantic/src/parsers/rust.rs:718–731  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

716
717 #[test]
718 fn test_extract_enum() {
719 let mut parser = RustParser::new();
720 let source = r#"
721pub enum Status {
722 Active,
723 Inactive,
724 Pending { reason: String },
725}
726"#;
727 let entities = parser.extract(source, "src/types.rs");
728 let status = entities.iter().find(|e| e.name == "Status").unwrap();
729 assert_eq!(status.kind, EntityKind::Enum);
730 assert!(status.exported);
731 }
732
733 #[test]
734 fn test_extract_trait() {

Callers

nothing calls this directly

Calls 3

extractMethod · 0.45
unwrapMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected