()
| 1342 | |
| 1343 | #[test] |
| 1344 | fn test_c_struct() { |
| 1345 | let mut parser = CppParser::new_c(); |
| 1346 | let source = r#" |
| 1347 | struct 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() { |