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

Function test_extract_enum

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

Source from the content-addressed store, hash-verified

912
913 #[test]
914 fn test_extract_enum() {
915 let mut parser = CppParser::new();
916 let source = r#"
917enum Color {
918 Red,
919 Green,
920 Blue
921};
922"#;
923 let entities = parser.extract(source, "color.cpp");
924 let color = entities.iter().find(|e| e.name == "Color").unwrap();
925 assert_eq!(color.kind, EntityKind::Enum);
926 assert!(
927 color.signature.as_ref().unwrap().contains("enum Color"),
928 "Signature: {:?}",
929 color.signature
930 );
931 }
932
933 #[test]
934 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