MCPcopy Create free account
hub / github.com/f0rr0/oliphaunt / parser_respects_buffer_views

Function parser_respects_buffer_views

src/protocol/tests.rs:809–817  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

807
808#[test]
809fn parser_respects_buffer_views() -> Result<()> {
810 let message = buffers::data_row(&[Some("bang")]);
811 let wrapper = concat_slices(&[&[1, 2, 3, 4], message.as_slice(), &[5, 6, 7, 8]]);
812 let slice = &wrapper[4..4 + message.len()];
813 let messages = parse_slices(&[slice])?;
814 assert_eq!(messages.len(), 1);
815 assert_data_row_fields(&messages[0], &[Some("bang")]);
816 Ok(())
817}
818
819#[test]
820fn serializer_builds_messages() -> Result<()> {

Callers

nothing calls this directly

Calls 5

data_rowFunction · 0.85
concat_slicesFunction · 0.85
parse_slicesFunction · 0.85
assert_data_row_fieldsFunction · 0.85
lenMethod · 0.80

Tested by

no test coverage detected