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

Function test_embedded_struct

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

Source from the content-addressed store, hash-verified

906
907 #[test]
908 fn test_embedded_struct() {
909 let mut parser = GoParser::new();
910 let source = r#"
911package main
912
913type Base struct {
914 ID string
915}
916
917type Extended struct {
918 Base
919 Extra string
920}
921"#;
922 let entities = parser.extract(source, "models.go");
923 assert!(
924 entities.iter().any(|e| e.name == "Base"),
925 "Should find Base struct"
926 );
927 assert!(
928 entities.iter().any(|e| e.name == "Extended"),
929 "Should find Extended struct"
930 );
931 }
932}

Callers

nothing calls this directly

Calls 1

extractMethod · 0.45

Tested by

no test coverage detected