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

Function test_extract_enum

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

Source from the content-addressed store, hash-verified

739
740 #[test]
741 fn test_extract_enum() {
742 let mut parser = RustParser::new();
743 let source = r#"
744pub enum Status {
745 Active,
746 Inactive,
747 Pending { reason: String },
748}
749"#;
750 let entities = parser.extract(source, "src/types.rs");
751 let status = entities.iter().find(|e| e.name == "Status").unwrap();
752 assert_eq!(status.kind, EntityKind::Enum);
753 assert!(status.exported);
754 }
755
756 #[test]
757 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