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

Function test_c_enum

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

Source from the content-addressed store, hash-verified

1386
1387 #[test]
1388 fn test_c_enum() {
1389 let mut parser = CppParser::new_c();
1390 let source = r#"
1391enum Status {
1392 OK,
1393 ERROR,
1394 PENDING
1395};
1396"#;
1397 let entities = parser.extract(source, "status.c");
1398 let status = entities.iter().find(|e| e.name == "Status").unwrap();
1399 assert_eq!(status.kind, EntityKind::Enum);
1400 }
1401
1402 #[test]
1403 fn test_c_define() {

Callers

nothing calls this directly

Calls 3

extractMethod · 0.45
unwrapMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected