MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / frame_read_write_roundtrip

Function frame_read_write_roundtrip

nodedb/src/control/server/native/codec.rs:195–203  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

193
194 #[tokio::test]
195 async fn frame_read_write_roundtrip() {
196 let payload = b"hello world";
197 let mut buf = Vec::new();
198 write_frame(&mut buf, payload).await.unwrap();
199
200 let mut cursor = std::io::Cursor::new(buf);
201 let read_back = read_frame(&mut cursor).await.unwrap().unwrap();
202 assert_eq!(read_back, payload);
203 }
204
205 #[tokio::test]
206 async fn frame_read_eof() {

Callers

nothing calls this directly

Calls 2

write_frameFunction · 0.70
read_frameFunction · 0.70

Tested by

no test coverage detected