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

Function test_c_struct

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

Source from the content-addressed store, hash-verified

1342
1343 #[test]
1344 fn test_c_struct() {
1345 let mut parser = CppParser::new_c();
1346 let source = r#"
1347struct Point {
1348 int x;
1349 int y;
1350};
1351"#;
1352 let entities = parser.extract(source, "point.c");
1353 let point = entities.iter().find(|e| e.name == "Point").unwrap();
1354 assert_eq!(point.kind, EntityKind::Class);
1355 }
1356
1357 #[test]
1358 fn test_c_typedef() {

Callers

nothing calls this directly

Calls 3

extractMethod · 0.45
unwrapMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected