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

Function test_enum_class

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

Source from the content-addressed store, hash-verified

1181
1182 #[test]
1183 fn test_enum_class() {
1184 let mut parser = CppParser::new();
1185 let source = r#"
1186enum class Direction {
1187 North,
1188 South,
1189 East,
1190 West
1191};
1192"#;
1193 let entities = parser.extract(source, "direction.cpp");
1194 let dir = entities.iter().find(|e| e.name == "Direction").unwrap();
1195 assert_eq!(dir.kind, EntityKind::Enum);
1196 }
1197
1198 #[test]
1199 fn test_realistic_cpp_header() {

Callers

nothing calls this directly

Calls 3

extractMethod · 0.45
unwrapMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected