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

Function test_extract_go

atomic-semantic/src/parsers/mod.rs:580–590  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

578
579 #[test]
580 fn test_extract_go() {
581 let mut registry = ParserRegistry::new();
582 let source = "package main\n\nfunc Greet(name string) string {\n\treturn \"Hello, \" + name\n}\n\ntype User struct {\n\tName string\n}\n";
583 let entities = registry.extract("main.go", source);
584 assert!(!entities.is_empty());
585 assert!(
586 entities.iter().any(|e| e.name == "Greet"),
587 "Should find Greet function, got: {:?}",
588 entities.iter().map(|e| &e.name).collect::<Vec<_>>()
589 );
590 }
591
592 #[test]
593 fn test_extract_java() {

Callers

nothing calls this directly

Calls 1

extractMethod · 0.45

Tested by

no test coverage detected