MCPcopy Create free account
hub / github.com/ZettaScaleLabs/hiroz / test_parse_bounded_string

Function test_parse_bounded_string

crates/hiroz-codegen/src/parser/msg.rs:214–227  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

212
213 #[test]
214 fn test_parse_bounded_string() {
215 let msg_content = r#"
216string<=255 type_name
217Field[] fields
218"#;
219 let path = PathBuf::from("IndividualTypeDescription.msg");
220
221 let msg = parse_msg_string(msg_content, "type_description_interfaces", &path).unwrap();
222
223 assert_eq!(msg.fields.len(), 2);
224 assert_eq!(msg.fields[0].name, "type_name");
225 assert_eq!(msg.fields[0].field_type.base_type, "string");
226 assert_eq!(msg.fields[1].name, "fields");
227 }
228
229 #[test]
230 fn test_parse_bounded_string_with_constants() {

Callers

nothing calls this directly

Calls 1

parse_msg_stringFunction · 0.85

Tested by

no test coverage detected