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

Function test_extract_void_function

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

Source from the content-addressed store, hash-verified

854
855 #[test]
856 fn test_extract_void_function() {
857 let mut parser = CppParser::new();
858 let source = r#"
859void greet(const char* name) {
860 printf("Hello, %s\n", name);
861}
862"#;
863 let entities = parser.extract(source, "greet.cpp");
864 let greet = entities.iter().find(|e| e.name == "greet").unwrap();
865 assert_eq!(greet.kind, EntityKind::Function);
866 assert!(
867 greet.signature.as_ref().unwrap().contains("void"),
868 "Signature: {:?}",
869 greet.signature
870 );
871 }
872
873 #[test]
874 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