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

Function test_c_define

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

Source from the content-addressed store, hash-verified

1401
1402 #[test]
1403 fn test_c_define() {
1404 let mut parser = CppParser::new_c();
1405 let source = r#"
1406#define BUFFER_SIZE 4096
1407"#;
1408 let entities = parser.extract(source, "config.h");
1409 let buf = entities.iter().find(|e| e.name == "BUFFER_SIZE").unwrap();
1410 assert_eq!(buf.kind, EntityKind::Const);
1411 }
1412}

Callers

nothing calls this directly

Calls 3

extractMethod · 0.45
unwrapMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected