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

Function test_extract_unexported_function

atomic-semantic/src/parsers/go.rs:447–463  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

445
446 #[test]
447 fn test_extract_unexported_function() {
448 let mut parser = GoParser::new();
449 let source = r#"
450package main
451
452func helper() bool {
453 return true
454}
455"#;
456 let entities = parser.extract(source, "main.go");
457 let helper = entities.iter().find(|e| e.name == "helper").unwrap();
458 assert_eq!(helper.kind, EntityKind::Function);
459 assert!(
460 !helper.exported,
461 "lowercase function should not be exported"
462 );
463 }
464
465 #[test]
466 fn test_extract_struct() {

Callers

nothing calls this directly

Calls 3

extractMethod · 0.45
unwrapMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected