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

Function test_extract_void_function

atomic-semantic/src/parsers/cpp.rs:833–848  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

831
832 #[test]
833 fn test_extract_void_function() {
834 let mut parser = CppParser::new();
835 let source = r#"
836void greet(const char* name) {
837 printf("Hello, %s\n", name);
838}
839"#;
840 let entities = parser.extract(source, "greet.cpp");
841 let greet = entities.iter().find(|e| e.name == "greet").unwrap();
842 assert_eq!(greet.kind, EntityKind::Function);
843 assert!(
844 greet.signature.as_ref().unwrap().contains("void"),
845 "Signature: {:?}",
846 greet.signature
847 );
848 }
849
850 #[test]
851 fn test_extract_class() {

Callers

nothing calls this directly

Calls 3

extractMethod · 0.45
unwrapMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected