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

Function test_extract_private_function

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

Source from the content-addressed store, hash-verified

642
643 #[test]
644 fn test_extract_private_function() {
645 let mut parser = RustParser::new();
646 let source = r#"
647fn helper() -> bool {
648 true
649}
650"#;
651 let entities = parser.extract(source, "src/lib.rs");
652 let helper = entities.iter().find(|e| e.name == "helper").unwrap();
653 assert_eq!(helper.kind, EntityKind::Function);
654 assert!(!helper.exported);
655 }
656
657 #[test]
658 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