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

Function test_extract_enum

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

Source from the content-addressed store, hash-verified

935
936 #[test]
937 fn test_extract_enum() {
938 let mut parser = CppParser::new();
939 let source = r#"
940enum Color {
941 Red,
942 Green,
943 Blue
944};
945"#;
946 let entities = parser.extract(source, "color.cpp");
947 let color = entities.iter().find(|e| e.name == "Color").unwrap();
948 assert_eq!(color.kind, EntityKind::Enum);
949 assert!(
950 color.signature.as_ref().unwrap().contains("enum Color"),
951 "Signature: {:?}",
952 color.signature
953 );
954 }
955
956 #[test]
957 fn test_extract_include() {

Callers

nothing calls this directly

Calls 3

extractMethod · 0.45
unwrapMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected