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

Function test_extract_private_function

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

Source from the content-addressed store, hash-verified

665
666 #[test]
667 fn test_extract_private_function() {
668 let mut parser = RustParser::new();
669 let source = r#"
670fn helper() -> bool {
671 true
672}
673"#;
674 let entities = parser.extract(source, "src/lib.rs");
675 let helper = entities.iter().find(|e| e.name == "helper").unwrap();
676 assert_eq!(helper.kind, EntityKind::Function);
677 assert!(!helper.exported);
678 }
679
680 #[test]
681 fn test_extract_async_function() {

Callers

nothing calls this directly

Calls 3

extractMethod · 0.45
unwrapMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected