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

Function test_c_include

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

Source from the content-addressed store, hash-verified

1367
1368 #[test]
1369 fn test_c_include() {
1370 let mut parser = CppParser::new_c();
1371 let source = r#"
1372#include <stdio.h>
1373#include <stdlib.h>
1374"#;
1375 let entities = parser.extract(source, "main.c");
1376 let includes: Vec<_> = entities
1377 .iter()
1378 .filter(|e| e.kind == EntityKind::Import)
1379 .collect();
1380 assert!(
1381 includes.len() >= 2,
1382 "Should find at least 2 C includes, got: {:?}",
1383 includes.iter().map(|e| &e.name).collect::<Vec<_>>()
1384 );
1385 }
1386
1387 #[test]
1388 fn test_c_enum() {

Callers

nothing calls this directly

Calls 3

extractMethod · 0.45
collectMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected