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

Function test_anonymous_namespace_skipped

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

Source from the content-addressed store, hash-verified

1071
1072 #[test]
1073 fn test_anonymous_namespace_skipped() {
1074 let mut parser = CppParser::new();
1075 let source = r#"
1076namespace {
1077 int internal_helper() {
1078 return 0;
1079 }
1080}
1081"#;
1082 let entities = parser.extract(source, "internal.cpp");
1083 // Anonymous namespace should be skipped (no Module entity),
1084 // but the function inside may still be extracted.
1085 assert!(
1086 !entities.iter().any(|e| e.kind == EntityKind::Module),
1087 "Should not extract anonymous namespace"
1088 );
1089 }
1090
1091 #[test]
1092 fn test_empty_source() {

Callers

nothing calls this directly

Calls 1

extractMethod · 0.45

Tested by

no test coverage detected