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

Function aligned_buf_write_and_read

nodedb-wal/src/align.rs:223–229  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

221
222 #[test]
223 fn aligned_buf_write_and_read() {
224 let mut buf = AlignedBuf::with_default_alignment(8192).unwrap();
225 let data = b"hello nodedb WAL";
226 let written = buf.write(data);
227 assert_eq!(written, data.len());
228 assert_eq!(&buf.as_slice()[..data.len()], data);
229 }
230
231 #[test]
232 fn aligned_slice_pads_to_boundary() {

Callers

nothing calls this directly

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected